com.esri.aims.mtier.model.axl.metadata
Class MetadataElementFactory

java.lang.Object
  |
  +--com.esri.aims.mtier.model.axl.metadata.MetadataElementFactory

public final class MetadataElementFactory
extends Object

This is a utility class used to create Elements for DOM document construction. For every element that is constructable the attributes are passed in as parameters to the method. Required attributes are marked in the documentation by a trailing "(REQUIRED)". All other values that are passed will be omitted from the returned Element if they are null. ...


Method Summary
static com.esri.w3c.dom.Element createArcXMLElement(String version)
          Creates an ARCXML element with the given version attribute.
static com.esri.w3c.dom.Element createChangeMetadataAccessElement(String docID, String isPrivate)
          Creates a CHANGE_METADATA_ACCESS element with name, userid, and private attributes.
static com.esri.w3c.dom.Element createChangeOwnerElement(String docID, String newOwner)
          Creates a CHANGE_OWNER element
static com.esri.w3c.dom.Element createCollectionInfoElement()
          Creates a COLLECTION_INFO element.
static com.esri.w3c.dom.Element createDeleteMetadataElement(String docID)
          Creates a DELETE_METADATA element with docID.
static com.esri.w3c.dom.Element createDeleteMetadataRelationshipElement()
          Creates a DELETE_METADATA_RELATIONSHIP element.
static com.esri.w3c.dom.Element createDocumentInfoElement(String name, String owner, String content)
          Creates a DOCUMENTINFO element.
static com.esri.w3c.dom.Element createEnvelopeElement(String minx, String maxx, String miny, String maxy, String spatialOperator)
          Creates an ENVELOPE element with xmin, xmax, ymin, ymax, and operator attributes.
static com.esri.w3c.dom.Element createFullTextElement(String word)
          Creates a FULLTEXT element with the given word attribute.
static com.esri.w3c.dom.Element createGetCollectionInfoElement(String collection, String tag, String zCode, String orderBy)
          Creates a GET_COLLECTION_INFO element.
static com.esri.w3c.dom.Element createGetContentInfoElement()
          Creates a GET_CONTENT_INFO element.
static com.esri.w3c.dom.Element createGetMetadataDocumentElement(String docID)
          Creates a GET_METADATA element.
static com.esri.w3c.dom.Element createGetMetadataElement()
          Creates a GET_METADATA element.
static com.esri.w3c.dom.Element createGetRootDatasetElement()
          Creates a GET_ROOT_DATASET element.
static com.esri.w3c.dom.Element createGetUserElement(String username)
          Creates a GET_USER element.
static com.esri.w3c.dom.Element createGetUUIDElement(String count)
          Creates a GET_UUID element.
static com.esri.w3c.dom.Element createMetadataChildElement(String docID)
          Creates a METADATA_CHILD element.
static com.esri.w3c.dom.Element createMetadataSiblingElement(String docID)
          Creates a METADATA_SIBLING element.
static com.esri.w3c.dom.Element createMetadataSourceElement(String docID)
          Creates a METADATA_SOURCE element.
static com.esri.w3c.dom.Element createPublishMetadataElement()
           
static com.esri.w3c.dom.Element createPutMetadataElement(String docID, String name, String content, String isFolder, String onLink, String parentDocId, String isPrivate, String server, String service, String serviceType, String documentContent)
          Creates a PUT_METADATA element.
static com.esri.w3c.dom.Element createPutMetadataRelationshipElement()
          Creates a PUT_METADATA_RELATIONSHIP element.
static com.esri.w3c.dom.Element createPutMetadataSemanticElement()
          Creates a PUT_METADATA_SEMANTIC element.
static com.esri.w3c.dom.Element createRelevanceElement(String docID, String relevance)
          Creates an ADD_RELEVANCE_FEEDBACK element.
static com.esri.w3c.dom.Element createRenameMetadataElement(String docID, String newName)
          Creates a RENAME_METADATA element.
static com.esri.w3c.dom.Element createRequestElement()
          Creates a REQUEST element.
static com.esri.w3c.dom.Element createSearchMetadataElement(String newOperator, String startResult, String maxResults, String foldermask, String sort, String sort2, String gndextent, String fullouput)
          Creates a SEARCH_METADATA element.
static com.esri.w3c.dom.Element createSemanticPairElement(String tag, String zcode, String attribute)
          Creates a SEMANTIC_PAIR element.
static com.esri.w3c.dom.Element createSubsetElement(String type, String docID)
          Creates a SUBSET element.
static com.esri.w3c.dom.Element createTagTextElement(String zcode, String tag, String word, String attribute)
          Creates a TAGTEXT element.
static com.esri.w3c.dom.Element createTagValueElement(String zCode, String tag, String lessThan, String greaterThan, String lessThanOrEqualTo, String greaterThanOrEqualTo, String equalTo, String notEqualTo, String attribute)
          Creates a TAGVALUE element.
static com.esri.w3c.dom.Element createThumbnailElement(String imageData)
          Creates a THUMBNAIL element.
static com.esri.w3c.dom.Element createUpdatedElement(String after, String before)
          Creates a UPDATED element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createArcXMLElement

public static com.esri.w3c.dom.Element createArcXMLElement(String version)
                                                    throws AXLAttributeException
Creates an ARCXML element with the given version attribute.

Parameters:
version - The ArcXML version of the request being sent. (REQUIRED)
Returns:
Element An ARCXML Element.
Throws:
AXLAttributeException - if required attributes are not properly set.

createChangeMetadataAccessElement

public static com.esri.w3c.dom.Element createChangeMetadataAccessElement(String docID,
                                                                         String isPrivate)
                                                                  throws AXLAttributeException
Creates a CHANGE_METADATA_ACCESS element with name, userid, and private attributes.

Parameters:
isPrivate - is the access setting for the given metadata. (REQUIRED)
Returns:
Element A CHANGE_METADATA_ACCESS Element.
Throws:
AXLAttributeException - if required attributes are not properly set.

createChangeOwnerElement

public static com.esri.w3c.dom.Element createChangeOwnerElement(String docID,
                                                                String newOwner)
                                                         throws AXLAttributeException
Creates a CHANGE_OWNER element

Parameters:
docID - the document ID. (REQUIRED)
newOwner - New owner for the given metadata. (REQUIRED)
Returns:
Element A CHANGE_OWNER Element.
Throws:
AXLAttributeException - if required attributes are not properly set.

createCollectionInfoElement

public static com.esri.w3c.dom.Element createCollectionInfoElement()
Creates a COLLECTION_INFO element.

Returns:
Element A COLLECTION_INFO Element.

createDeleteMetadataElement

public static com.esri.w3c.dom.Element createDeleteMetadataElement(String docID)
                                                            throws AXLAttributeException
Creates a DELETE_METADATA element with docID.

Parameters:
docID - the document identifier. (REQUIRED)
Returns:
Element A DELETE_METADATA Element.
Throws:
AXLAttributeException - if required attributes are not properly set.

createDeleteMetadataRelationshipElement

public static com.esri.w3c.dom.Element createDeleteMetadataRelationshipElement()
Creates a DELETE_METADATA_RELATIONSHIP element.

Returns:
Element A DELETE_METADATA_RELATIONSHIP Element.

createDocumentInfoElement

public static com.esri.w3c.dom.Element createDocumentInfoElement(String name,
                                                                 String owner,
                                                                 String content)
Creates a DOCUMENTINFO element.

Returns:
Element A DOCUMENTINFO Element.

createEnvelopeElement

public static com.esri.w3c.dom.Element createEnvelopeElement(String minx,
                                                             String maxx,
                                                             String miny,
                                                             String maxy,
                                                             String spatialOperator)
                                                      throws AXLAttributeException
Creates an ENVELOPE element with xmin, xmax, ymin, ymax, and operator attributes.

Parameters:
spatialOperator - defines the new operator on the Envelope object. This is currently defined as one of the following: "fuzzywithin"(default), "within", "overlaps", or "fuzzyequals".
Returns:
Element An ENVELOPE Element.
Throws:
AXLAttributeException - if required attributes are not properly set.

createFullTextElement

public static com.esri.w3c.dom.Element createFullTextElement(String word)
                                                      throws AXLAttributeException
Creates a FULLTEXT element with the given word attribute.

Returns:
Element A DELETE_METADATA_RELATIONSHIP Element.
Throws:
AXLAttributeException - if required attributes are not properly set.

createGetCollectionInfoElement

public static com.esri.w3c.dom.Element createGetCollectionInfoElement(String collection,
                                                                      String tag,
                                                                      String zCode,
                                                                      String orderBy)
                                                               throws AXLAttributeException
Creates a GET_COLLECTION_INFO element.

Parameters:
collection - (REQUIRED)
tag - ...
zCode - ...
orderBy - ...
Returns:
Element A GET_COLLECTION_INFO Element.
Throws:
AXLAttributeException - if required attributes are not properly set.

createGetContentInfoElement

public static com.esri.w3c.dom.Element createGetContentInfoElement()
Creates a GET_CONTENT_INFO element.

Returns:
Element A GET_CONTENT_INFO Element.

createGetMetadataElement

public static com.esri.w3c.dom.Element createGetMetadataElement()
Creates a GET_METADATA element.

Returns:
Element A GET_METADATA Element.

createGetMetadataDocumentElement

public static com.esri.w3c.dom.Element createGetMetadataDocumentElement(String docID)
                                                                 throws AXLAttributeException
Creates a GET_METADATA element.

Parameters:
docID - the document identifier.
Returns:
Element A GET_METADATA Element.
Throws:
AXLAttributeException - if required attributes are not properly set.

createGetRootDatasetElement

public static com.esri.w3c.dom.Element createGetRootDatasetElement()
Creates a GET_ROOT_DATASET element.

Returns:
Element A GET_ROOT_DATASET Element.

createGetUserElement

public static com.esri.w3c.dom.Element createGetUserElement(String username)
                                                     throws AXLAttributeException
Creates a GET_USER element.

Parameters:
username - the user name string.
Returns:
Element a GET_USER Element.
Throws:
AXLAttributeException - if required attributes are not properly set.

createGetUUIDElement

public static com.esri.w3c.dom.Element createGetUUIDElement(String count)
Creates a GET_UUID element.

Parameters:
count - Determines the number of unique IDs to generate
Returns:
Element A GET_UUID Element.

createMetadataChildElement

public static com.esri.w3c.dom.Element createMetadataChildElement(String docID)
                                                           throws AXLAttributeException
Creates a METADATA_CHILD element.

Parameters:
docID - the document identifier.
Returns:
Element a METADATA_CHILD Element.
Throws:
AXLAttributeException - if required attributes are not properly set.

createMetadataSiblingElement

public static com.esri.w3c.dom.Element createMetadataSiblingElement(String docID)
                                                             throws AXLAttributeException
Creates a METADATA_SIBLING element.

Parameters:
docID - the document identifier.
Returns:
Element a METADATA_SIBLING Element.
Throws:
AXLAttributeException - if required attributes are not properly set.

createMetadataSourceElement

public static com.esri.w3c.dom.Element createMetadataSourceElement(String docID)
                                                            throws AXLAttributeException
Creates a METADATA_SOURCE element.

Parameters:
docID - the document identifier.
Returns:
Element a METADATA_SOURCE Element.
Throws:
AXLAttributeException - if required attributes are not properly set.

createPublishMetadataElement

public static com.esri.w3c.dom.Element createPublishMetadataElement()

createPutMetadataElement

public static com.esri.w3c.dom.Element createPutMetadataElement(String docID,
                                                                String name,
                                                                String content,
                                                                String isFolder,
                                                                String onLink,
                                                                String parentDocId,
                                                                String isPrivate,
                                                                String server,
                                                                String service,
                                                                String serviceType,
                                                                String documentContent)
                                                         throws AXLAttributeException
Creates a PUT_METADATA element.

Parameters:
docID - the document identifier.
name - a user-friendly name identifying the dataset corresponding to the document.
content -
parentDocId - Unique string for identifying a document belonging to the parent name and parent owner.
isPrivate - Determines whether document is viewable for all users. Use "false" if the document is viewable by all users. Use "true" when the document is viewable only by the document owner.
server - The URL of the Web server containing data or metadata associated with the document, for example, http://mymachine.domain.com.
service - The name of the ArcIMS service containing data or metadata associated with the document.
serviceType - Type of ArcIMS service.
documentContent - Metadata document to be published.
Returns:
Element A PUT_METADATA Element.
Throws:
AXLAttributeException - if required attributes are not properly set.

createPutMetadataRelationshipElement

public static com.esri.w3c.dom.Element createPutMetadataRelationshipElement()
Creates a PUT_METADATA_RELATIONSHIP element.

Returns:
Element A PUT_METADATA_RELATIONSHIP Element.

createPutMetadataSemanticElement

public static com.esri.w3c.dom.Element createPutMetadataSemanticElement()
Creates a PUT_METADATA_SEMANTIC element.

Returns:
Element A PUT_METADATA_SEMANTIC Element.

createRelevanceElement

public static com.esri.w3c.dom.Element createRelevanceElement(String docID,
                                                              String relevance)
                                                       throws AXLAttributeException
Creates an ADD_RELEVANCE_FEEDBACK element.

Parameters:
docID - the document identifier.
relevance - ...
Returns:
Element an ADD_RELEVANCE_FEEDBACK Element.
Throws:
AXLAttributeException - if required attributes are not properly set.

createRenameMetadataElement

public static com.esri.w3c.dom.Element createRenameMetadataElement(String docID,
                                                                   String newName)
                                                            throws AXLAttributeException
Creates a RENAME_METADATA element.

Parameters:
newName - the new name string.
Returns:
Element A RENAME_METADATA Element.
Throws:
AXLAttributeException - if required attributes are not properly set.

createRequestElement

public static com.esri.w3c.dom.Element createRequestElement()
Creates a REQUEST element.

Returns:
Element A REQUEST Element.

createSearchMetadataElement

public static com.esri.w3c.dom.Element createSearchMetadataElement(String newOperator,
                                                                   String startResult,
                                                                   String maxResults,
                                                                   String foldermask,
                                                                   String sort,
                                                                   String sort2,
                                                                   String gndextent,
                                                                   String fullouput)
Creates a SEARCH_METADATA element.

Parameters:
newOperator - ...
startResult - ...
maxResults - ...
foldermask - ...
sort - ...
sort2 - ...
Returns:
Element A SEARCH_METADATA Element.
Throws:
AXLAttributeException - if required attributes are not properly set.

createSemanticPairElement

public static com.esri.w3c.dom.Element createSemanticPairElement(String tag,
                                                                 String zcode,
                                                                 String attribute)
                                                          throws AXLAttributeException
Creates a SEMANTIC_PAIR element.

Parameters:
tag - ...
attribute - ...
Returns:
Element A SEMANTIC_PAIR Element.
Throws:
AXLAttributeException - if required attributes are not properly set.

createSubsetElement

public static com.esri.w3c.dom.Element createSubsetElement(String type,
                                                           String docID)
                                                    throws AXLAttributeException
Creates a SUBSET element.

Parameters:
type - ...
docID - ...
Returns:
Element A SUBSET Element.
Throws:
AXLAttributeException - if required attributes are not properly set.

createTagTextElement

public static com.esri.w3c.dom.Element createTagTextElement(String zcode,
                                                            String tag,
                                                            String word,
                                                            String attribute)
                                                     throws AXLAttributeException
Creates a TAGTEXT element.

Parameters:
tag - ...
word - ...
attribute - ...
Returns:
Element A TAGTEXT Element.
Throws:
AXLAttributeException - if required attributes are not properly set.

createTagValueElement

public static com.esri.w3c.dom.Element createTagValueElement(String zCode,
                                                             String tag,
                                                             String lessThan,
                                                             String greaterThan,
                                                             String lessThanOrEqualTo,
                                                             String greaterThanOrEqualTo,
                                                             String equalTo,
                                                             String notEqualTo,
                                                             String attribute)
                                                      throws AXLAttributeException
Creates a TAGVALUE element.

Parameters:
zCode - ...
tag - ...
lessThan - ...
greaterThan - ...
lessThanOrEqualTo - ...
greaterThanOrEqualTo - ...
equalTo - ...
notEqualTo -
attribute - ...
Returns:
Element A TAGVALUE Element.
Throws:
AXLAttributeException - if required attributes are not properly set.

createThumbnailElement

public static com.esri.w3c.dom.Element createThumbnailElement(String imageData)
                                                       throws AXLAttributeException
Creates a THUMBNAIL element.

Parameters:
imageData - The thumbnail image as data to be encapsulated between the THUMBNAIL tags.
Returns:
Element A THUMBNAIL Element.
Throws:
AXLAttributeException - if required attributes are not properly set.

createUpdatedElement

public static com.esri.w3c.dom.Element createUpdatedElement(String after,
                                                            String before)
Creates a UPDATED element. All dates should be in the form YYYY-MM-DD hh:mm:ss.

Parameters:
after -
before -
Returns:
Element An UPDATED Element.