|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.information.metadata.PathUrl
public class PathUrl
This class encapsulates the SBIP formatted URL. IT has a protocol of SBIP, and has a repository name, a root tree name, the path, the entity name, and the type. Instances can be set as write-protected, so the URL can't be changed out from under an object that may be using it to represent a specific entity in the repository. The clone method can be used to create a copy of an instance that can be modified.
Field Summary | |
---|---|
static char |
EXTENDED_PATH_DELIMITER
The default delimiter (#) used for separating nested objects contained within an extended path. |
static int |
PARSE_FLAG_NO_TYPE
|
static java.lang.String |
PATHURL_DONT_USE_NAME
|
Constructor Summary | |
---|---|
PathUrl(PathUrl context,
java.lang.String url)
Construct a PathUrl from a known context, plus a partial path. |
|
PathUrl(java.lang.String url)
Construct a new PathUrl from a URL string. |
|
PathUrl(java.lang.String url,
int flags)
|
|
PathUrl(java.lang.String repository,
java.lang.String rootTree,
java.lang.String path,
java.lang.String name,
java.lang.String type)
Construct a new PathUrl from the URL components. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Create a copy of this object. |
static java.lang.String |
decodeString(java.lang.String origString)
|
static java.lang.String |
encodeString(java.lang.String origString)
|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getAbsolutePath()
Get the absolute path to the object This basically just leaves off the SBIP and repository/server. |
java.lang.String |
getDisplayPath()
Get a user-friendly display string. |
java.lang.String |
getExtendedPath()
|
java.lang.String |
getFullTypeString()
Get the type with any extension it may have. |
java.lang.String |
getName()
Get the name of the object. |
java.lang.String |
getPath()
Get the path for this object. |
java.lang.String |
getPrimaryName()
Get the name of the object in the main path. |
java.lang.String |
getRepository()
Get the string with the repository definition name. |
java.lang.String |
getRootTree()
Get the name of the root Tree for this item. |
java.lang.String |
getServer()
Get the string with the server definition name. |
java.lang.String |
getType()
Get the type of the object. |
static boolean |
isAbsolutePath(java.lang.String pathString)
This is a method requested by another group to take a string and determine if it's a full SBIP URL, or just an absolute path. |
boolean |
isWritable()
Return the flag indicating if this instance is write-protected. |
static PathUrl |
newPathUrlFromAbsolutePath(ServerInterface server,
java.lang.String absolutePath)
Create a new PathUrl from an existing absolute path and a ServerInterface to use as context. |
static PathUrl |
newPathUrlFromExistingUrl(ServerInterface server,
PathUrl oldPath)
Create a new PathUrl from an existing PathUrl. |
void |
setExtendedPath(java.lang.String extension)
|
void |
setName(java.lang.String name)
Set the name of the object. |
void |
setPath(java.lang.String path)
Set the path from the root folder to the object. |
void |
setRepository(java.lang.String repository)
Set the name of the repository definition for this object. |
void |
setRootTree(java.lang.String tree)
Set the root tree for this item. |
void |
setType(java.lang.String type)
Set the type for the object. |
void |
setUnwritable()
Make this instance write-protected. |
java.lang.String |
toString()
Return the string representation of this URL. |
Field Detail |
---|
public static final char EXTENDED_PATH_DELIMITER
public static final java.lang.String PATHURL_DONT_USE_NAME
public static final int PARSE_FLAG_NO_TYPE
Constructor Detail |
---|
public PathUrl(java.lang.String url)
url
- A string of the form
SBIP://repositorydef/root[/path]/name[(type)]public PathUrl(java.lang.String url, int flags)
public PathUrl(PathUrl context, java.lang.String url)
context
- The context of the url which should yield an absolute address.url
- The path of the object relative to the context.public PathUrl(java.lang.String repository, java.lang.String rootTree, java.lang.String path, java.lang.String name, java.lang.String type)
repository
- The name of the repository definition the entity resides in.rootTree
- The name of the tree where the entity resides.path
- The path to the object.name
- The name of the object.type
- The type string for the object.Method Detail |
---|
public static boolean isAbsolutePath(java.lang.String pathString)
pathString
- The String to check for absolute path or not.
public static PathUrl newPathUrlFromAbsolutePath(ServerInterface server, java.lang.String absolutePath) throws ServiceException, java.rmi.RemoteException
server
- The server where the path exists.absolutePath
- The path to the desired object.
ServiceException
- If the path cannot be resolved.
java.rmi.RemoteException
- In the event of remote object failure.public static PathUrl newPathUrlFromExistingUrl(ServerInterface server, PathUrl oldPath) throws ServiceException, java.rmi.RemoteException
server
- The server where the path actually exists.oldPath
- The old SBIP URL with the correct absolute path. This
can actually also be a new style SBIP URL, in which
case it will simply be returned.
ServiceException
- If the path cannot be resolved.
java.rmi.RemoteException
- In the event of remote object failure.public static java.lang.String encodeString(java.lang.String origString)
public static java.lang.String decodeString(java.lang.String origString)
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean isWritable()
public void setUnwritable()
public java.lang.String getRepository()
public java.lang.String getServer()
public void setRepository(java.lang.String repository)
repository
- The name of the repository this object resides in.
java.lang.IllegalStateException
- If the instance is write-protected.public java.lang.String getRootTree()
public void setRootTree(java.lang.String tree)
tree
- The root tree name under which this item resides.
java.lang.IllegalStateException
- if the instance is write-protected.public java.lang.String getPath()
public java.lang.String getAbsolutePath()
public java.lang.String getDisplayPath()
public void setPath(java.lang.String path)
path
- The path of the object.
java.lang.IllegalStateException
- If the instance is write-protected.public java.lang.String getPrimaryName()
public java.lang.String getName()
public void setName(java.lang.String name)
name
- The repository name of the object
java.lang.IllegalStateException
- If the instance is write-protected.public java.lang.String getType()
public void setType(java.lang.String type)
type
- The type for the object.
java.lang.IllegalStateException
- If the instance is write-protected.public java.lang.String getFullTypeString()
public java.lang.String getExtendedPath()
public void setExtendedPath(java.lang.String extension)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |