public class WGDocumentKey
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DIVIDER |
Constructor and Description |
---|
WGDocumentKey(int type,
java.lang.String name,
java.lang.String mediakey)
Public constructor, taking all information separately, using type int
|
WGDocumentKey(java.lang.String key)
Public constructor taking a composite document key string that is parsed for its contents
|
WGDocumentKey(java.lang.String typename,
java.lang.String name,
java.lang.String mediakey)
Public constructor, taking all information separately
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
getDocType()
Returns the numeric document type as constants WGDocument.TYPE_*
|
WGDocument |
getDocument(WGDatabase db)
Tries to retrieve the document for the document key from the given database
|
java.lang.String |
getMediakey()
Returns the media key.
|
java.lang.String |
getName()
Returns the unique name/key
|
java.lang.String |
getTypename()
Returns the type name as constant WGDocument.TYPENAME_*
|
int |
hashCode() |
boolean |
isDesignDocumentType()
Returns if the current document is a design or schema document
|
boolean |
isRealDocumentKey()
Returns if this document key adresses a "real" document.
|
java.lang.String |
toString()
Constructs the string representation of this document key
|
WGDocumentKey |
withQualifier(java.lang.String qualifier)
Creates a new key with an additional qualifier that is just used to distinguish this key via
equals(Object) and hashCode() but is not used within the key itself. |
public static final java.lang.String DIVIDER
public WGDocumentKey(java.lang.String typename, java.lang.String name, java.lang.String mediakey)
typename
- The typename, use constants WGDocument.TYPENAME_*name
- The unique key/name of the documentmediakey
- The media key. Should be null when the key does not represent a WebTML modulepublic WGDocumentKey(int type, java.lang.String name, java.lang.String mediakey)
type
- The document type, use constants WGDocument.TYPE_*name
- The unique key/name of the documentmediakey
- The media key. Should be null when the key does not represent a WebTML modulepublic WGDocumentKey(java.lang.String key)
key
- The document keypublic boolean isDesignDocumentType()
public java.lang.String getMediakey()
public java.lang.String getName()
public java.lang.String getTypename()
public java.lang.String toString()
toString
in class java.lang.Object
public int getDocType()
public WGDocument getDocument(WGDatabase db) throws WGAPIException
db
- The databaseWGAPIException
public boolean isRealDocumentKey()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public WGDocumentKey withQualifier(java.lang.String qualifier)
equals(Object)
and hashCode()
but is not used within the key itself.
This is needed for mapping the session context of temp duplicates of WGDocument
.qualifier
-