Package net.ontopia.infoset.impl.basic
Class URILocator
java.lang.Object
net.ontopia.infoset.impl.basic.URILocator
- All Implemented Interfaces:
Externalizable,Serializable,LocatorIF
- Direct Known Subclasses:
RDBMSLocator
PUBLIC: A Uniform Resource Identifier locator. Only URI locators
should be used with this locator class. The notation is 'URI'.
The address is always normalized by the constructor. The address given to the constructor must be absolute.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionINTERNAL: No-argument constructor used by serialization.URILocator(File file) PUBLIC: Creates a URILocator containing a file URL referring to the file represented by the File object.URILocator(String address) PUBLIC: Creates a URILocator representing the URI given.URILocator(URL url) PUBLIC: Creates a URILocator representing the URL given. -
Method Summary
Modifier and TypeMethodDescriptionstatic URILocatorPUBLIC: Parses the URI and returns an instance of URILocator if the URI is valid.booleanPUBLIC: Returns the locator address in absolute and normalized form.PUBLIC: Returns the address of the locator in external form; that is, with special characters that need to be escaped escaped using the escape syntax of the locator notation.PUBLIC: Gets the locator notation.getUri()INTERNAL: returns the internal URI state of this locator.inthashCode()voidresolveAbsolute(String rel) PUBLIC: Given a locator address string that is relative to this locator, return an absolute locator.toString()void
-
Field Details
-
NOTATION
- See Also:
-
address
-
-
Constructor Details
-
URILocator
public URILocator()INTERNAL: No-argument constructor used by serialization. Do not use this constructor in application code. -
URILocator
PUBLIC: Creates a URILocator representing the URI given. Note that the URI string should be in external form, and that it must be absolute.- Throws:
URISyntaxException
-
URILocator
PUBLIC: Creates a URILocator representing the URL given. -
URILocator
PUBLIC: Creates a URILocator containing a file URL referring to the file represented by the File object.- Since:
- 1.3.4
-
-
Method Details
-
getNotation
Description copied from interface:LocatorIFPUBLIC: Gets the locator notation. The default notation is URI. Ontopia will never use notation names which begin with 'x-'. Notation names are case-insensitive.Note that only the URI notation is supported in release OKS 4.0 and newer.
- Specified by:
getNotationin interfaceLocatorIF
-
getAddress
Description copied from interface:LocatorIFPUBLIC: Returns the locator address in absolute and normalized form. Whether addresses are case-sensitive or not depends on the locator notation.- Specified by:
getAddressin interfaceLocatorIF
-
resolveAbsolute
Description copied from interface:LocatorIFPUBLIC: Given a locator address string that is relative to this locator, return an absolute locator. If the input locator address is absolute the returned locator object will simply contain that absolute locator address.- Specified by:
resolveAbsolutein interfaceLocatorIF
-
getExternalForm
Description copied from interface:LocatorIFPUBLIC: Returns the address of the locator in external form; that is, with special characters that need to be escaped escaped using the escape syntax of the locator notation.- Specified by:
getExternalFormin interfaceLocatorIF
-
hashCode
public int hashCode() -
equals
-
toString
-
getUri
INTERNAL: returns the internal URI state of this locator. -
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
create
PUBLIC: Parses the URI and returns an instance of URILocator if the URI is valid. If the URI is invalid null is returned.- Since:
- 3.0
-