| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.repository.xml.RepositoryXMLTools
public class RepositoryXMLTools
Utils class to encode/decode item-descriptors, property names and mapping files into XML compatible namespaces and identifiers. These are the encoding rules we follow. XML identifiers can only contain "_", "-", ".", letter and digit. So we encode all the other characters using hex value as _XXXX. We also encode "_" to "__" to avoid confusion with our hex representation. There is also another restraint on the starting character of XML identifier, it can only be letter or "_". So for starting character we encode everything except letter.
| Field Summary | |
|---|---|
| static java.lang.String | CHECKOUT_TAGtag used to check out DocumentBuilder from the DocumentBuilder pool. | 
| static java.lang.String | CLASS_VERSION | 
| static java.lang.String | CONTENT_REPOSITORIES_PATHPath of ContentRepositories component which is used to retrive Repository corresponding to the repository name. | 
| static java.lang.String | FILE_ELEMENT_SEPARATORSchema file name of item-descriptor contains repositoryname, item-descriptor name, and mapping file name& property names if exist. | 
| static java.lang.String | NAME_SPACEconstant representing namespace prefix. | 
| static java.lang.String | NAME_SPACE_ELEMENT_SEPARATORString representing separator for elements in namespace. | 
| static java.lang.String | SCHEMA_FILE_EXTENSIONfile extension of schema file. | 
| static atg.repository.nucleus.RepositoryRegistryService | sContentRepositoriesContentRepositories component. | 
| protected static char[] | sHexDigitsHexadecimal digits | 
| Fields inherited from class atg.nucleus.GenericService | 
|---|
| SERVICE_INFO_KEY | 
| Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging | 
|---|
| DEFAULT_LOG_TRACE_STATUS | 
| Fields inherited from interface atg.nucleus.logging.ApplicationLogging | 
|---|
| DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS | 
| Constructor Summary | |
|---|---|
| RepositoryXMLTools() | |
| Method Summary | |
|---|---|
|  void | addItemDescToPropertyMap(java.util.Map pMap,
                         RepositoryItemDescriptor pDescriptor,
                         java.lang.String pPropertyName)This method adds the RepositoryItemDescriptor and propertyName passed to it to the Map passed to it. | 
|  void | error(org.xml.sax.SAXParseException pException)Implementation of the SAX ErrorHandler interface method. | 
|  void | fatalError(org.xml.sax.SAXParseException pException)Implementation of the SAX ErrorHandler interface method. | 
|  atg.xml.tools.pools.DocumentBuilderPool | getDocumentBuilderPool()Returns Pool of DocumentBuilder resource to parse the XML document. | 
|  atg.repository.xml.ItemDescToPropertyNameInfo[] | getItemDescriptorsToInclude(RepositoryItemDescriptor pDescriptor,
                            atg.repository.databinding.ItemMappingElement pItemMappingElement)This method determines for a given RepositoryItemDescriptor and ItemMappingElement pair, what RepositoryItemDescriptors will be included in the data model. | 
|  atg.repository.databinding.ItemMappingElement | getItemMappingElement(RepositoryPropertyDescriptor pPropertyDesc,
                      RepositoryItemDescriptor pItemDesc,
                      atg.repository.databinding.ItemMappingElement pMappingElement)This method will obtain an ItemMappingElement that describes how the RepositoryItemDescriptor associated with the RepositoryPropertyDescriptor should be mapped. | 
|  atg.repository.databinding.ItemMappingElement | getItemMappingElement(java.lang.String pNamespaceURI)This method obtains the Mapping elements represented by the namesapceURI. | 
|  atg.repository.xml.ItemDescToNSInfo[] | getNSInfoForItems(RepositoryItemDescriptor pItemDescriptor,
                  atg.repository.databinding.ItemMappingElement pItemMappingElement,
                  java.lang.String pMappingFileName)This method determines for a given item-descriptor and optional ItemMappingElement what item-descriptors can be directly referenced by the pItemDescriptorparameter. | 
|  java.lang.String | getNSItemDescriptor(RepositoryItemDescriptor pItemDesc)Constructs the namespace URI corresponding to item-descriptor passed. | 
|  java.lang.String | getNSItemDescriptor(RepositoryItemDescriptor pItemDesc,
                    java.lang.String pMappingFileName)Constructs the namespace URI corresponding to item-descriptor and mapping file passed. | 
|  java.lang.String | getNSItemDescriptor(RepositoryItemDescriptor pItemDesc,
                    java.lang.String pMappingFileName,
                    java.lang.String pPropertyName)Constructs the namespace URI corresponding to item-descriptor, mapping file and property name passed. | 
|  java.lang.String | getNSPrefix(RepositoryPropertyDescriptor pPropertyDesc,
            RepositoryItemDescriptor pItemDescriptor,
            atg.repository.databinding.ItemMappingElement pMappingElement)This method will determine the correct namespace prefix to use for the item-descriptor that is pointed to by the property represented by the pPropertyDescparameter. | 
|  java.lang.String | getNSPrefixForItemDescriptor(RepositoryItemDescriptor pItemDesc)Constructs the prefix to use for the name space in xml schema, it will be xml encoded item-descriptor name. | 
|  java.lang.String | getNSPrefixForItemDescriptor(RepositoryItemDescriptor pItemDesc,
                             java.lang.String pPropertyName)Constructs the prefix to use for the name space in xml schema, it will be xml encoded mapping file name and item-descriptor name. | 
|  char | getPropertyElementNameSeparator()Returns Separator Character to use in XML Schema & instance document to separate property name from itemDescriptor name | 
|  atg.repository.databinding.PropertyMappingElement | getPropertyMappingElement(atg.repository.databinding.ItemMappingElement pItemMappingElement,
                          RepositoryPropertyDescriptor pPropertyDescriptor)This method will determine if there is a PropertyMappingElement on the ItemMappingElement parameter whose name corresponds to the name of the RepositoryPropertyDescriptor parameter passed to this method. | 
|  java.lang.String | getPropertyName(atg.repository.databinding.ItemMappingElement pItemMappingElement,
                java.lang.String pPropertyName)Decodes the Property Name from xml Identifier | 
|  java.lang.String | getPropertyNameForItem(java.lang.String pLocalName,
                       atg.repository.databinding.ItemMappingElement pItemMappingElement)This method is associated with the getPropertyNameForXML()method. | 
|  java.lang.String | getPropertyNameForXML(RepositoryPropertyDescriptor pPropDesc,
                      atg.repository.databinding.ItemMappingElement pItemMappingElement)This method will obtain the name for a property of an item-descriptor. | 
|  java.lang.String | getRepositoryIdentifier(java.lang.String pXMLIdentifier)Decodes XML-compatible identifier into repository property identifier This method calls the decodeFromXML()method. | 
|  RepositoryItemDescriptor | getRepositoryItemDescriptor(java.lang.String pNameSpace)Get the repository item-descriptor that corresponds to the namespace URI of pNamespaceURI. | 
|  RepositoryItem[] | getRepositoryItems(org.w3c.dom.Document pDocument,
                   java.util.Map pMatchValues)This method will select RepositoryItems based upon information from the pDocumentparameter and thepMatchValuesparameter. | 
|  RepositoryItem[] | getRepositoryItems(org.w3c.dom.Document pDocument,
                   java.lang.String[] pMatchProperties,
                   atg.repository.databinding.ItemMappingElement pItemMappingElement)Retrieves the Repository items from Documentobject. | 
|  RepositoryItem[] | getRepositoryItems(org.xml.sax.InputSource pXML,
                   java.util.Map pMatchValues)This method will select RepositoryItems based upon information from the pDocumentparameter and thepMatchValuesparameter. | 
|  RepositoryItem[] | getRepositoryItemsFromXML(org.xml.sax.InputSource pInputSource,
                          java.lang.String[] pMatchProperties)Parses the XML string and retrieves the Repository items corresponding to the XML. | 
|  RepositoryItem[] | getRepositoryItemsFromXML(java.lang.String pXMLString,
                          java.lang.String[] pMatchProperties)Parses the XML string and retrieves the Repository items corresponding to the XML. | 
|  java.lang.String | getSchemaFileName(RepositoryItemDescriptor pItemDesc)Returns the filename to be used to store the xml schema corresponding to the item-descriptor. | 
|  java.lang.String | getSchemaFileName(RepositoryItemDescriptor pItemDesc,
                  java.lang.String pMappingFileName)Returns the filename to be used to store the xml schema corresponding to the item-descriptor and mapping file name. | 
|  java.lang.String | getSchemaFileName(RepositoryItemDescriptor pItemDesc,
                  java.lang.String pMappingFileName,
                  java.lang.String pPropertyName)Returns the filename to be used to store the xml schema corresponding to the item-descriptor and mapping file name. | 
| static java.lang.String | getSchemaFileName(java.lang.String pNameSpace) | 
|  atg.repository.xml.XMLSchemaManager | getSchemaManager()Returns Schema Manager | 
|  java.lang.String | getXMLIdentifier(java.lang.String pRepositoryIdentifier)Constructs XML-compatible identifier corresponding to the string passed This method calls the encodeToXML()method. | 
|  java.lang.String | getXMLSchemaNSURI()Return the value to use for the XMLSchema namespace URI. | 
|  boolean | isAddItemTypeToPropertyNames()This property controls whether or not elements in an instance document that correspond to a property of a Repository Item should have the item-descriptor name appended to the property name. | 
|  boolean | isElementSimpleType(java.lang.String pNamespaceURI,
                    java.lang.String pLocalName)This method determines if the XML element represented by the pNamespaceURIandpLocalNameparameters
 is a "simple" type. | 
|  boolean | isEncodeRepositoryIdAsAttr()This property controls where repositoryId properties appear. | 
|  boolean | isIncludeProperty(RepositoryPropertyDescriptor pDescriptor,
                  atg.repository.databinding.ItemMappingElement pItemMappingElement)This method determines whether or not a single property should be included in an exported data model or not. | 
|  boolean | isPropertyMappingElement(java.lang.String pPropertyName,
                         atg.repository.databinding.ItemMappingElement pElement)This method determines if there is a property mapping element whose name is the same as the name passed in as the pPropertyName. | 
|  boolean | isRepositoryIdMatchCriteria(java.lang.String[] pMatchProperties)Determines if there is an entry in the pMatchProperties parameter that equals the repositoryId string. | 
|  boolean | isSimpleType(java.lang.Class pType)Helper to identify "atomic" properties. | 
|  atg.repository.xml.ItemDescToPropertyNameInfo[] | removeDuplicateEntries(atg.repository.xml.ItemDescToPropertyNameInfo[] pItemDescToPropertyInfos)This method walks through the list passed to it and removes any entries within it that are equal. | 
|  RepositoryItem[] | selectRepositoryItemById(org.w3c.dom.Document pDocument,
                         java.lang.String[] pMatchProperties)This method will select a repository item from the repository represented by top-level element appearing in the pDocumentparameter. | 
|  RepositoryItem[] | selectRepositoryItems(RepositoryItemDescriptor pItemDescriptor,
                      java.util.Map pPropMap)Constructs the RQL query from pPropMapand executes against
 the RepositoryItemDescriptor . | 
|  void | setAddItemTypeToPropertyNames(boolean addItemTypeToPropertyNames)Sets the addItemTypeToPropertyNames. | 
|  void | setDocumentBuilderPool(atg.xml.tools.pools.DocumentBuilderPool pDocumentBuilderPool)Sets Pool of DocumentBuilder resource to parse the XML document. | 
|  void | setEncodeRepositoryIdAsAttr(boolean encodeRepositoryIdAsAttr)Sets the encodeRepositoryIdAsAttr. | 
|  void | setPropertyElementNameSeparator(char pPropertyElementNameSeparator)Sets Separator Character to use in XML Schema & instance document to separate property name from itemDescriptor name | 
|  void | setSchemaManager(atg.repository.xml.XMLSchemaManager pSchemaManager)Sets Schema Manager | 
|  void | setXMLSchemaNSURI(java.lang.String pXMLSchemaNSURI)Set the XMLSchemaNSURI property. | 
|  void | warning(org.xml.sax.SAXParseException pException)Implementation of the SAX ErrorHandler interface method. | 
| Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl | 
|---|
| vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static java.lang.String CLASS_VERSION
protected static final char[] sHexDigits
public static final java.lang.String NAME_SPACE
public static final java.lang.String NAME_SPACE_ELEMENT_SEPARATOR
public static final java.lang.String SCHEMA_FILE_EXTENSION
public static final java.lang.String FILE_ELEMENT_SEPARATOR
public static final java.lang.String CONTENT_REPOSITORIES_PATH
public static atg.repository.nucleus.RepositoryRegistryService sContentRepositories
public static final java.lang.String CHECKOUT_TAG
| Constructor Detail | 
|---|
public RepositoryXMLTools()
| Method Detail | 
|---|
public boolean isEncodeRepositoryIdAsAttr()
public void setEncodeRepositoryIdAsAttr(boolean encodeRepositoryIdAsAttr)
encodeRepositoryIdAsAttr - The encodeRepositoryIdAsAttr to setpublic boolean isAddItemTypeToPropertyNames()
public void setAddItemTypeToPropertyNames(boolean addItemTypeToPropertyNames)
addItemTypeToPropertyNames - The addItemTypeToPropertyNames to setpublic java.lang.String getXMLSchemaNSURI()
http://www.w3.org/2001/XMLSchema by default,
 but changing the value on this component should change the URI that
 is used by all components.
public void setXMLSchemaNSURI(java.lang.String pXMLSchemaNSURI)
pXMLSchemaNSURI - public char getPropertyElementNameSeparator()
public void setPropertyElementNameSeparator(char pPropertyElementNameSeparator)
PropertyElementNameSeparator - public atg.xml.tools.pools.DocumentBuilderPool getDocumentBuilderPool()
public void setDocumentBuilderPool(atg.xml.tools.pools.DocumentBuilderPool pDocumentBuilderPool)
DocumentBuilderPool - public atg.repository.xml.XMLSchemaManager getSchemaManager()
public void setSchemaManager(atg.repository.xml.XMLSchemaManager pSchemaManager)
SchemaManager - public java.lang.String getNSItemDescriptor(RepositoryItemDescriptor pItemDesc)
http://www.atg.com/ns/repository/item-descriptor
pItemDesc - a RepositoryItemDescriptor value
public java.lang.String getNSItemDescriptor(RepositoryItemDescriptor pItemDesc,
                                            java.lang.String pMappingFileName)
http://www.atg.com/ns/mappingfile/repository/item-descriptor
the - item-descriptor that a namespace URI will be constructed
 forthe - mapping file that will be used, in conjunction with the
 item-descriptor, to generate a namespaceURI
public java.lang.String getNSItemDescriptor(RepositoryItemDescriptor pItemDesc,
                                            java.lang.String pMappingFileName,
                                            java.lang.String pPropertyName)
http://www.atg.com/ns/mappingfile/repository/item-descriptor/propertyName
the - item-descriptor that a namespace URI will be created forthe - mapping file that will be used to create a namespace URIthe - property name that will be used to construct the namespace
 URI
public java.lang.String getNSPrefixForItemDescriptor(RepositoryItemDescriptor pItemDesc)
public java.lang.String getNSPrefixForItemDescriptor(RepositoryItemDescriptor pItemDesc,
                                                     java.lang.String pPropertyName)
itemDescriptorNamePropertyName
pItemDesc - the item-descriptor that will be used to create
 a namespace prefixpMappingFileName - the name of a mapping file that will be used
 in creating a namespace prefix
public java.lang.String getXMLIdentifier(java.lang.String pRepositoryIdentifier)
encodeToXML() method.
pRepositoryIdentifier - the name of an item-descriptor that will
 be encoded to an XML identifier.
public java.lang.String getRepositoryIdentifier(java.lang.String pXMLIdentifier)
decodeFromXML() method.
public java.lang.String getSchemaFileName(RepositoryItemDescriptor pItemDesc)
public java.lang.String getSchemaFileName(RepositoryItemDescriptor pItemDesc,
                                          java.lang.String pMappingFileName)
public java.lang.String getSchemaFileName(RepositoryItemDescriptor pItemDesc,
                                          java.lang.String pMappingFileName,
                                          java.lang.String pPropertyName)
public static java.lang.String getSchemaFileName(java.lang.String pNameSpace)
public RepositoryItemDescriptor getRepositoryItemDescriptor(java.lang.String pNameSpace)
pNamespaceURI.
pNameSpace - the namespace URI that will be resolved to a specific
 repository item-descriptor.
public atg.repository.databinding.ItemMappingElement getItemMappingElement(java.lang.String pNamespaceURI)
                                                                    throws MappingException
pNamespaceURI - the namespaceURI that may contain a reference to
 a mapping file name
MappingException
public atg.repository.xml.ItemDescToNSInfo[] getNSInfoForItems(RepositoryItemDescriptor pItemDescriptor,
                                                               atg.repository.databinding.ItemMappingElement pItemMappingElement,
                                                               java.lang.String pMappingFileName)
                                                        throws RepositoryException
pItemDescriptor parameter.  This list of
 item-descriptors should be populated by iterating over the properties
 of the pItemDescriptor and determining for each property
 that points to an item-descriptor, whether or not it is to be included
 in the exported data model.  This is determined by calling the
 isIncludeProperty() method.
 For each item-descriptor that is found to be included, we need to
 determine all of its possible subtypes since any one of these subtypes
 could be assigned as valid options.
 Finally, for each item-descriptor that is found to be included
 determine what the namespace, namespace prefix and property name that
 that item-descriptor corresponds to.
pItemDescriptor - the item-descriptor whose properties are
 introspected to determine if they point to other item-descriptors
 and should be exported in the data model.pItemMappingElement - optional argument, which if present will
 guide the decision in determining which properties should be included
 in the exported data model.pMappingFileName - file name for the mapping file, the value for
 this is used to construct the namespace URI.
pItemDescriptor parameter.
RepositoryExceptionpublic atg.repository.xml.ItemDescToPropertyNameInfo[] removeDuplicateEntries(atg.repository.xml.ItemDescToPropertyNameInfo[] pItemDescToPropertyInfos)
pItemDescToPropertyMapping - a Map value
public atg.repository.xml.ItemDescToPropertyNameInfo[] getItemDescriptorsToInclude(RepositoryItemDescriptor pDescriptor,
                                                                                   atg.repository.databinding.ItemMappingElement pItemMappingElement)
                                                                            throws RepositoryException
pDescriptor parameter passed to
 this method, that property will be checked to see if it references
 another item-descriptor.  (For Maps, Sets, Lists this means if
 there componentItemType is another item-descriptor)  If a given
 property does reference another item-descriptor then it is
 checked whether the property is to be exported by calling the
 isItemDescriptorIncluded() method.
 For each property that is to be exported in the data model,
 the item-descriptor that that property references and all of its
 subtypes (if applicable) will be determined and added to the array
 of RepositoryItemDescriptors to return.
pDescriptor - the RepositoryItemDescriptor whose properties
 will be searched.pItemMappingElement - an item-mapping element that can control what
 properties are or  are not to be included in the data model.  This
 property is optional.
pDescriptor parameter and are to be included in the exported
 data model.  If there are not RepositoryItemDescriptors then null is
 returned.
RepositoryException
public boolean isPropertyMappingElement(java.lang.String pPropertyName,
                                        atg.repository.databinding.ItemMappingElement pElement)
pPropertyName.
pPropertyName - the name that a PropertyMappingElement whose
 name matches will be checked for.pElement - ItemMappingElement whose PropertyMappingElements will
 be checked.
public void addItemDescToPropertyMap(java.util.Map pMap,
                                     RepositoryItemDescriptor pDescriptor,
                                     java.lang.String pPropertyName)
                              throws RepositoryException
pMap - map that the pDescriptor and all of it
 subtype item-descriptors should be added to with a value mapping of
 the pPropertyName parameter passed.pDescriptor - item-descriptor that will be added to the map as the
 key entry to the map.  Additionally, all subtypes for this
 item-descriptor will be determined and added to the map.pPropertyName - the property name that will be used for the
 value mapping of the pDescriptor
RepositoryException
public boolean isIncludeProperty(RepositoryPropertyDescriptor pDescriptor,
                                 atg.repository.databinding.ItemMappingElement pItemMappingElement)
      pDescriptor argument then the PropertyMappingElement
      dictates whether the property should be included.  (via
      the PropertyMappingElement isInclude() method.
  cascadeDelete then it will be included
  
pDescriptor - a RepositoryPropertyDescriptor valuepItemMappingElement - this is an optional argument.  If one is
 passed to this method then it will check for an entry indicating whether
 or not a single property should be exported.
public atg.repository.databinding.ItemMappingElement getItemMappingElement(RepositoryPropertyDescriptor pPropertyDesc,
                                                                           RepositoryItemDescriptor pItemDesc,
                                                                           atg.repository.databinding.ItemMappingElement pMappingElement)
pPropertyDesc - RepositoryPropertyDescriptor whose property
 ItemDescriptor will be checked for within the passed ItemMappingElement.pMappingElement - ItemMappingElement that may contain an enclosed
 PropertyMappingElement corresponding to the pPropertyDesc
public atg.repository.databinding.PropertyMappingElement getPropertyMappingElement(atg.repository.databinding.ItemMappingElement pItemMappingElement,
                                                                                   RepositoryPropertyDescriptor pPropertyDescriptor)
pItemMappingElement - ItemMappingElement whose
 PropertyMappingElements will be examined.pPropertyDescriptor - propertyDescriptor describing a property
 that a corresponding PropertyMappingElement will be searched for
pPropertyDescriptor.  If none is found then null is
 returned.
public java.lang.String getNSPrefix(RepositoryPropertyDescriptor pPropertyDesc,
                                    RepositoryItemDescriptor pItemDescriptor,
                                    atg.repository.databinding.ItemMappingElement pMappingElement)
                             throws atg.repository.xml.SchemaGenerationException
pPropertyDesc parameter.
pPropertyDesc - RepositoryPropertyDescriptor that a namespace prefix
 is being generated forpMappingFileName - the name of the mapping file that the
 pMappingElement originated frompMappingElement - parsed contents of a mapping file
SchemaGenerationException - if an error occurs
public boolean isElementSimpleType(java.lang.String pNamespaceURI,
                                   java.lang.String pLocalName)
pNamespaceURI and pLocalName parameters
 is a "simple" type.  That is, every schema has elements with the name
 "string", "long" etc. appended to it.  These elements correspond to the
 simple value types.
pNamespaceURI - the namespace URI of the current XML elementpLocalName - the localname of the current XML element
public boolean isSimpleType(java.lang.Class pType)
public RepositoryItem[] selectRepositoryItems(RepositoryItemDescriptor pItemDescriptor,
                                              java.util.Map pPropMap)
                                       throws RepositoryException
pPropMap and executes against
 the RepositoryItemDescriptor .
pItemDescriptor - to execute query against. The RQL is executed for
 the item descriptor type found in pItemDescriptor.pPropMap - the Map should contain the property names as the keys of
 the map and values of the properties to use for constructing the RQL as
 values.
RepositoryException
public RepositoryItem[] getRepositoryItemsFromXML(java.lang.String pXMLString,
                                                  java.lang.String[] pMatchProperties)
                                           throws MatchException
pMatchPropeties to match against the
 repository items from XML.  The incoming XML is treated as a 
 Repository Item, the property names that appear in the 
 pMatchProperties parameter will be used to extract
 repository items from the target repository whose values match
 the property values for the incoming XML.
pXMLString - the XMLpMatchPropeties - an array of property names that will be used
 to match on repository item properties.
MatchException
public RepositoryItem[] getRepositoryItems(org.xml.sax.InputSource pXML,
                                           java.util.Map pMatchValues)
                                    throws MatchException
pDocument parameter and the pMatchValues
 parameter.  The type of item-descriptor to select will be based upon
 the item-type that corresponds to the root namespace of the element
 in the pDocument.
 Items are then selected by calling the
 selectRepositoryItems method to find items.
pXMLString - the XML document whose namespace will be introspected
 to determine to the type item to selectpMatchValues - key/value pairs used to select items from the
 repository
MatchException
public RepositoryItem[] getRepositoryItemsFromXML(org.xml.sax.InputSource pInputSource,
                                                  java.lang.String[] pMatchProperties)
                                           throws MatchException
pMatchPropeties to match against the
 repository items from XML. If mapping file is used while generating
 the XML instance string, then that mapping file name should be passed
 as the paramter pMappingFileName.
pXMLString - the XML document whose namespace will be introspected
 to determine to the type item to selectpMatchValues - key/value pairs used to select items from the
 repository
MatchException
public RepositoryItem[] getRepositoryItems(org.w3c.dom.Document pDocument,
                                           java.util.Map pMatchValues)
                                    throws RepositoryException
pDocument parameter and the pMatchValues
 parameter.  The type of item-descriptor to select will be based upon
 the item-type that corresponds to the root namespace of the element
 in the pDocument.
 Items are then selected by calling the
 selectRepositoryItems method to find items.
pDocument - the DocumentElement of this document will have it's
 namespace examined.  This namespace is resolved to a particular type
 of item-descriptor.  This item-descriptor is the type of repository item
 that is selected.pMatchValues - set of name/value pairs.  The name is a property
 appearing in the corresponding item-descriptor.  The value is the value
 that selected repository items will have for the corresponding property.
RepositoryException
public RepositoryItem[] getRepositoryItems(org.w3c.dom.Document pDocument,
                                           java.lang.String[] pMatchProperties,
                                           atg.repository.databinding.ItemMappingElement pItemMappingElement)
                                    throws RepositoryException
Document object.
pDocument - the XML documentpMatchProperties - an aray of property names that should
 be used when matching existing repository items to be updated
 with an incoming XML document.pItemMappingElement - the item mapping element corresponding to
 the mapping of the incoming XML document to Repository item-descriptors
RepositoryException - if an error occurspublic boolean isRepositoryIdMatchCriteria(java.lang.String[] pMatchProperties)
pMatchProperties - properties to match upon for selecting items from
 the repository.
public RepositoryItem[] selectRepositoryItemById(org.w3c.dom.Document pDocument,
                                                 java.lang.String[] pMatchProperties)
                                          throws RepositoryException
pDocument parameter.
 This selection will be by repository id.  The value for the repository
 id will be taken from the attributes appearing on the document element
 of the pDocument parameter.  The attribute should be named
 repositoryId.
 This method will return a single selected item in the array.
pDocument - the document whose document element contains a repository
 id.pMatchProperties - properties to select items on
RepositoryException - if an error occurs
public java.lang.String getPropertyName(atg.repository.databinding.ItemMappingElement pItemMappingElement,
                                        java.lang.String pPropertyName)
pItemMappingElement - the itemMappingElement that indicates
 what property for an incoming XML document maps to what property on
 a RepositoryItemDescriptorpPropertyName - the name of the property that a specific mapping
 should be obtained for
pPropertyName.
public java.lang.String getPropertyNameForXML(RepositoryPropertyDescriptor pPropDesc,
                                              atg.repository.databinding.ItemMappingElement pItemMappingElement)
propertyElementNameSeparator character, followed by the
 propertyName.  Or, the only the property name can be returned without
 the prefixed item-descriptor name.  The
 addItemTypeToPropertyNames property defined on this class
 controls this behavior.
 If a propertyMappingElement exists for this property, and a
 target name is defined, then the target name will always be used by
 itself.
pPropDesc - the property descriptor that the XML element name is
 being generated for.pItemMappingElement - the ItemMappingElement that controls how this
 property is mapped.  This ItemMappingElement might contain a
 PropertyMappingElement that corresponds to the property described by
 the pPropDesc parameterpItemDescriptorName - the name of the item-descriptor on which
 this property descriptor is defined
public java.lang.String getPropertyNameForItem(java.lang.String pLocalName,
                                               atg.repository.databinding.ItemMappingElement pItemMappingElement)
getPropertyNameForXML()
 method.  The difference is in the direction this method works for.
 Instead of generating a XML element name for a RepositoryPropertyDescriptor
 it will determine the name of a property on an item-descriptor for
 a property appearing in an instance document.
pLocalName - the localName of the element that appeared in an
 instance documentpItemMappingElement - the ItemMappingelement that controls how
 an instance document is mapped into a repository item.
#addItemTypePropertyNamespublic void warning(org.xml.sax.SAXParseException pException)
warning in interface org.xml.sax.ErrorHandlerpException - SAXParseException that occured during the processing
 of an instance document.public void error(org.xml.sax.SAXParseException pException)
error in interface org.xml.sax.ErrorHandlerpException - SAXParseException that occured during the processing
 of an instance document.public void fatalError(org.xml.sax.SAXParseException pException)
fatalError in interface org.xml.sax.ErrorHandlerpException - SAXParseException that occured during the processing
 of an instance document.| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||