|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ucsb.nceas.morpho.datapackage.MetadataObject
edu.ucsb.nceas.morpho.datapackage.AbstractDataPackage
class that represents a data package. This class is abstract. Specific datapackages e.g. eml2, beta6., etc extend this abstact class
actually, only the load and serialize methods are abstract. A number of other concrete utlity methods are included in this class. Note that this class extends the MetadataObject class. The essense of this class is thus the DOM metadataNode (which contains references to all the Nodes in the DOM and the metadataPathNode. The metadataPathNode references an XML structure which maps generic DataPackage information to specific paths for the grammar being considered. Thus, handling changes in the grammar of eml2, for example, should just require one to create a new map from generic nodes to the new specific ones.
----- A description of how this class is to be used-----New DataPackage class for Morpho for handling EML2 and other metadata content standards
It is desired to create a new class for representing 'generic' dataPackage objects, with EML2 being the immediate goal. It is desired, however, to avoid being too specific so that changes in standards can easily be configured without major code re-writes. This memo attempts to describe the current design.
A simplified class diagram is shown below for discussion purposes.
MetadataObject <---------------- AbstractDataPackage <---------- EML200DataPackage <---------- NBIIBioDataPackage <----DataPackageFactory <---------- EML2Beta6DataPackage
The base class is 'MetadataObject'. Basically, this class just a DOM structure containing the metadata for a defined schema (the 'schemaGrammer'(i.e. doctype) is also a member variable for the class) . There is also a member called the 'xpathKeyMap'. This is supposed to be a reference to a set of mappings between generic concepts (e.g. the package name) and the specific DOM xpath to the node in the specific DOM that contains the actual concept. This map is stored in a properties file of some type (e.g. an XML file) that is read at run time. Thus, minor changes in a schema can be handled by just updating this properties file rather than changing the code.
Now, the 'AbstractDataPackage' class extends the very general purpose 'MetadataObject' class and is meant to be used specifically for representing dataPackages of different types. The class is call 'Abstract...' because there are certain actions (like 'load' and 'serialize' that a specific to the schemaGrammar. Thus the 'AbstractDataPackage' class is extended by various schema specific classes such as the three shown above (i.e. EML200DataPackage, NBIIBioDataPackage, and EML2Beta6DataPackage). Note that the xpathKeyMap used is different for each of these specific package classes.
Finally, the DataPackageFactory class is used to create a new datapackage object f rom a supplied DOM or from a docID of a document on metacat or stored locally. A factory method is needed so that it can determine just what schema is desired and which of the specific package classes should be used to create the object. Once created, however, methods in the AbstractDataPackage that are generic can be used to get information stored in the package.
xpathKeyMap
Consider now how the xpathKeyMap works. An example in XML format for eml200 is reproduced below. It should be noted that this example is organized as a set of 'contextNode' elements. The 'package' contextNode corresponds to the root of datapackage DOM while other contextNodes, like 'entity' refer to some node in the dom other than the root. The contextNode serves as the point of departure for XPath searches. The concept allows for relative searche - e.g. one can give paths relative to the entity context node.
An example of xpathKeyMap use is the problem of finding the "accessionNumber" for a generic metadata schema. The document below has an 'accessionNumber' element under the 'package' contextNode. It's value for eml2 is seen to be '/eml:eml/@packageId'. ONe first looks up this value in the xpathKeyMap and then applies the xpath to the eml2 dataPackage dom. We have thus added a level of indirection where specific paths are looked up in the xpathKeyMap using generic path names.
As another example, one would look at the 'name' element under the 'entity' contextNode to get an entity name. In this case the relative path is simply 'entityName'. But how does one get the actual entity contextNode where the relative path starts? In this example, the higher level 'entities' element under the package contextNode is an xpath that will return a NodeSet of entity nodes in the eml2 dom. Each of these nodes is a starting point for the entity information (i.e. the root of the entity subtree).
<?xml version="1.0"?>
<xpathKeyMap schemaGrammar="eml2.0.0">
<!-- element name is key, element value is Xpath for this grammar -->
<contextNode name="package">
<entities>/eml:eml/dataset/dataTable</entities>
<title>/eml:eml/dataset/title</title>
<author>/eml:eml/dataset/creator/individualName/surName</author>
<accessionNumber>/eml:eml/@packageId</accessionNumber>
<keywords>/eml:eml/dataset/keywordSet/keyword</keywords>
</contextNode>
<!-- Xpaths for entity values are defined as relative to top node of entity -->
<contextNode name="entity">
<name>entityName</name>
<numRecords>numberOfRecords</numRecords>
<entityDescription>entityDescription</entityDescription >
<physical>physical</physical>
<attributes>attributeList/attribute</attributes>
</contextNode>
<contextNode name="attribute">
<name>attributeName</name>
<dataType>storageType</dataType>
<isText>count(measurementScale/nominal|measurementScale/ordinal)!=0</isText>
<isDate>count(measurementScale/datetime)!=0</isDate>
</contextNode>
<contextNode name="physical">
<name>objectName</name>
<fieldDelimiter>dataFormat/textFormat/simpleDelimited/fieldDelimiter</fieldDelimiter>
<numberHeaderLines>dataFormat/textFormat/numHeaderLines</numberHeaderLines>
<size>size</size>
<format>dataFormat/externallyDefinedFormat/formatName</format>
<isText>count(dataFormat/textFormat)!=0</isText>
<distribution>distribution</distribution>
</contextNode>
<contextNode name="distribution">
<isOnline>count(online/url)!=0</isOnline>
<url>online/url</url>
<isInline>count(inline)!=0</isInline>
<inline>inline</inline>
</contextNode>
</xpathKeyMap>
Field Summary | |
static java.lang.String |
BOTH
used to signify that this package is stored on metacat and locally. |
protected ConfigXML |
config
|
protected java.io.File |
dataPkgFile
|
protected Entity[] |
entityArray
|
protected FileSystemDataStore |
fileSysDataStore
|
protected java.lang.String |
id
|
protected java.lang.String |
initialId
|
static java.lang.String |
LOCAL
used to signify that this package is located locally |
protected java.lang.String |
location
|
static java.lang.String |
METACAT
used to signify that this package is located on a metacat server |
protected MetacatDataStore |
metacatDataStore
|
Fields inherited from class edu.ucsb.nceas.morpho.datapackage.MetadataObject |
doc, grammar, grammarType, metadataNode, metadataPathNode, root |
Constructor Summary | |
AbstractDataPackage()
|
Method Summary | |
void |
addAttributeForImport(java.lang.String entityName,
java.lang.String attributeName,
java.lang.String scale,
OrderedMap omap,
java.lang.String xPath,
boolean newTable)
|
void |
addEntity(Entity entity)
This method automatically adds an entity in the DOM at the next available position |
void |
addNewUnit(java.lang.String unitType,
java.lang.String unit)
|
org.w3c.dom.Node |
appendAdditionalMetadata(org.w3c.dom.Node addtMetadata)
|
void |
clearAllAttributeImports()
|
void |
delete(java.lang.String location)
Deletes the package from the specified location |
void |
deleteAllEntities()
This method deletes the indexed entity from the DOM |
java.util.List |
deleteAllSubtrees(java.lang.String genericName)
DELETES ALL subtrees identified by genericName String; returns null if none found - USE WITH CARE!! |
void |
deleteAttribute(int entityIndex,
int attributeIndex)
This method deletes the indexed attribute from the indexed entity |
void |
deleteEntity(int entNum)
This method deletes the indexed entity from the DOM |
org.w3c.dom.Node |
deleteSubtree(java.lang.String genericName,
int index)
deletes subtree at location identified by genericName and index; returns root Node of deleted subtree, or null if not found, so caller can determine whether call was successful |
abstract AbstractDataPackage |
download(java.lang.String id)
Copies the AbstractDataPackage with the indicated id from metacat to the local file store |
void |
export(java.lang.String path)
exports a package to a given path |
void |
exportDataFiles(java.lang.String path)
copies all the data files in a package to a directory indicated by 'path'. |
void |
exportToZip(java.lang.String path)
Exports a package to a zip file at the given path |
java.lang.String |
getAccessionNumber()
convenience method to retrieve accession number from DOM |
org.w3c.dom.Node[] |
getAttributeArray(int entityIndex)
This method creates an array of attribute Nodes for the indexed entity in the entityNode array. |
int |
getAttributeCountForAnEntity(int entityIndex)
This method gets the count of the attributes present in a particular entity |
java.lang.String |
getAttributeDataType(int entityIndex,
int attributeIndex)
|
java.lang.String |
getAttributeID(int entityIndex,
int attributeIndex)
|
int |
getAttributeImportCount()
|
int |
getAttributeIndex(int entityIndex,
java.lang.String attributeName)
This method retreives the attribute index given an Attribute Name and the index of the entity that the attribute is present in. |
java.lang.String |
getAttributeName(int entityIndex,
int attributeIndex)
|
java.lang.String |
getAttributeUnit(int entityIndex,
int attributeIndex)
|
java.lang.String |
getAuthor()
convenience method to get the DataPackage author May be overridden for specific package types to give better response (e.g. |
java.lang.String |
getCompressionMethod(int entityIndex,
int physicalIndex)
This method returns the compression method for the indexed entity and physical object. |
org.w3c.dom.Node |
getCoverageNode()
checks to see if the package has a coverage element at the package level returns a Node if it finds one; otherwise, null |
java.lang.String |
getCurrentImportAttributeName()
|
java.lang.String |
getCurrentImportEntityName()
|
OrderedMap |
getCurrentImportMap()
|
java.lang.String |
getCurrentImportScale()
|
java.lang.String |
getCurrentImportXPath()
|
org.w3c.dom.Node[] |
getDistributionArray(int entityIndex,
int physicalIndex)
This method creates an array of 'distribution' nodes, following the eml2 model of a subtree with information about the distribution of the actual data being characterized by the metadata. |
java.lang.String |
getDistributionInlineData(int entityIndex,
int physicalIndex,
int distIndex)
This method returns 'inline' data as a String for the indexed entity, physical object, and distribution object. |
java.lang.String |
getDistributionUrl(int entityIndex,
int physicalIndex,
int distIndex)
This method returns the url for data as a String for the indexed entity, physical object, and distribution object. |
java.lang.String |
getEncodingMethod(int entityIndex,
int physicalIndex)
This method returns the encoding method for the indexed entity and physical object. |
Entity[] |
getEntityArray()
|
int |
getEntityCount()
This method gets the count of the entities present in the package |
java.lang.String |
getEntityDescription(int entNum)
This method retrieves the entity Description, given the index of the entity in the entityNode array |
java.lang.String |
getEntityID(int entNum)
This method retrieves the entity ID, given the index of the entity in the entityNode array |
int |
getEntityIndex(java.lang.String entName)
This method retrieves entity index information, given the name of the entity in the entityNode array |
java.lang.String |
getEntityName(int entNum)
This method retrieves entityName information, given the index of the entity in the entityNode array |
java.lang.String |
getEntityNumRecords(int entNum)
This method retrieves the number of records in thr entity, given the index of the entity in the entityNode array |
protected java.io.File |
getFileWithID(java.lang.String ID,
Morpho morpho)
|
org.w3c.dom.NodeList |
getGeographicNodeList()
gets a list of geographic nodes |
java.util.List |
getIDsForNodesWithName(java.lang.String genericName)
returns a java.util.List containing IDs of all the rootnodes
of all the subtrees identified by the passed unique String. |
java.lang.String |
getInitialId()
gets the initialId variable |
java.lang.String |
getKeywords()
convenience method for getting package keywords |
java.util.List |
getLastImportedAttributes()
|
java.util.Vector |
getLastImportedDataSet()
|
java.lang.String |
getLastImportedEntity()
|
java.lang.String |
getLocation()
Method to return the location |
java.lang.String |
getNewUniqueReferenceID()
returns a new refID that is guaranteed to be unique within this datapackage |
Entity[] |
getOriginalEntityArray()
|
java.lang.String |
getPackageId()
convenience method to retrieve packageID from DOM synonym for getAccessionNumber |
org.w3c.dom.Node[] |
getPhysicalArray(int entityIndex)
|
java.lang.String |
getPhysicalFieldDelimiter(int entityIndex,
int physicalIndex)
This method returns the FieldDelimiter for the indexed entity and physical object. |
java.lang.String |
getPhysicalFormat(int entityIndex,
int physicalIndex)
This method returns the physocal format. |
java.lang.String |
getPhysicalName(int entityIndex,
int physicalIndex)
This method returns the name of indexed physical object for the indicated entity index. |
java.lang.String |
getPhysicalNumberHeaderLines(int entityIndex,
int physicalIndex)
This method returns the number of header lines for the indexed entity and physical object. |
java.lang.String |
getPhysicalSize(int entityIndex,
int physicalIndex)
This method returns the size for the indexed entity and physical object. |
OrderedMap |
getSecondImportMap()
|
org.w3c.dom.Node |
getSubtree(java.lang.String genericName,
int index)
returns cloned root Node of subtree identified by genericName String and int index; returns null if not found NOTE: the cloned subtree is a new node. |
abstract org.w3c.dom.Node |
getSubtreeAtReference(java.lang.String refID)
returns cloned root Node of subtree identified by the passed unique String refID; returns null if not found |
abstract org.w3c.dom.Node |
getSubtreeAtReferenceNoClone(java.lang.String refID)
returns pointer to root Node of subtree identified by the passed unique String refID; returns null if not found |
org.w3c.dom.Node |
getSubtreeNoClone(java.lang.String genericName,
int index)
returns root Node of subtree identified by genericName String and int index; returns null if not found |
java.util.List |
getSubtrees(java.lang.String genericName)
returns a List of cloned root Nodes of subtrees identified by genericName String; returns null if not found NOTE: the cloned subtrees are new nodes. |
abstract java.util.List |
getSubtreesThatReference(java.lang.String refID)
returns a List of pointers to subtrees that reference (the subtree identified by) the passed refID. |
org.w3c.dom.NodeList |
getTaxonomicNodeList()
gets a list of taxonomic nodes |
org.w3c.dom.NodeList |
getTemporalNodeList()
gets a list of temporal nodes |
java.lang.String |
getTitle()
convenience method to get the DataPackage title |
java.lang.String[] |
getUnitDictionaryCustomUnitTypes()
|
java.lang.String[] |
getUnitDictionaryUnitsOfType(java.lang.String type)
|
abstract boolean |
ignoreConsecutiveDelimiters(int entityIndex,
int physicalIndex)
returns boolean indicating whether repeated delimiters should be ignored |
void |
insertAttribute(int entityIndex,
Attribute newAttr,
int attrIndex)
This method inserts an attribute at the indexed position in the indexed entity |
void |
insertCoverage(org.w3c.dom.Node covSubtree)
insert a coverage subtree (geographic, temporal, or taxonomic) under the package level coverage node 'covSubtree' is assumed to be a DOM subtree of the proper type to be added under a coverage node |
void |
insertEntity(Entity entity,
int pos)
This method inserts an entity in the DOM at the indexed position |
static void |
insertObjectIntoArray(java.lang.Object[] arr,
java.lang.Object value,
java.lang.Object[] newArr)
|
org.w3c.dom.Node |
insertSubtree(java.lang.String genericName,
org.w3c.dom.Node subtreeRootNode,
int index)
inserts subtree rooted at Node, at location identified by genericName String and int index. |
boolean |
isCurrentImportNewTable()
|
boolean |
isNewCustomUnit(java.lang.String type,
java.lang.String unit)
|
abstract void |
load(java.lang.String location,
java.lang.String identifier,
Morpho morpho)
This abstract method loads a datapackage from metacat or the local file system based on an identifier. |
void |
loadCustomUnits()
|
org.w3c.dom.Document |
openAsDom(java.lang.String id)
method to return a DOM Document rather than a Reader Since the real purppose is to provide the source for an XSLT transform a DOM can passed instead of a Reader. |
java.io.Reader |
openAsReader(java.lang.String id)
method to return a Reader object, which will provide access to a character-based resource. |
void |
removeAttributeForImport()
|
void |
removeGeographicNodes()
remove all the geographicNodes |
void |
removeTaxonomicNodes()
remove all the taxonomicNodes |
void |
removeTemporalNodes()
remove all the temporalNodes |
org.w3c.dom.Node |
replaceSubtree(java.lang.String genericName,
org.w3c.dom.Node newSubtreeRootNode,
int index)
replaces subtree at location identified by genericName and index; returns root Node of replaced subtree, or null if not found, so caller can determine whether replace was successful |
abstract org.w3c.dom.Node |
replaceSubtreeAtReference(java.lang.String refID,
org.w3c.dom.Node newSubtreeRoot)
replaces subtree identified by the passed unique String refID; returns null if not found. |
abstract void |
serialize(java.lang.String location)
This abstract method turns the datapackage into a form (e.g. |
void |
serializeData()
|
void |
setAccessionNumber(java.lang.String id)
convenience method to set accession number from DOM |
void |
setDistributionUrl(int entityIndex,
int physicalIndex,
int distIndex,
java.lang.String urlS)
This method sets the url for data as a String for the indexed entity, physical object, and distribution object. |
void |
setEntityID(int entNum,
java.lang.String ID)
This method sets the entity ID, given the index of the entity in the entityNode array and the ID. |
void |
setEntityNumRecords(int entNum,
java.lang.String numRecS)
This method sets the number of records in the entity, given the index of the entity in the entityNode array |
void |
setInitialId(java.lang.String initId)
sets the initialId variable |
void |
setLastImportedAttributes(java.util.List attr)
|
void |
setLastImportedDataSet(java.util.Vector data)
|
void |
setLastImportedEntity(java.lang.String name)
|
void |
setLocation(java.lang.String location)
Method to set the location |
void |
setOriginalEntityArray(Entity[] arr)
|
void |
setPhysicalFieldDelimiter(int entityIndex,
int physicalIndex,
java.lang.String delim)
This method sets the FieldDelimiter for the indexed entity and physical object. |
void |
setPhysicalSize(int entityIndex,
int physicalIndex,
java.lang.String sizeS)
This method sets the size for the indexed entity and physical object. |
void |
showPackageSummary()
This method displays a summary of Package information by calling the various utility methods defined in this class. |
boolean |
subtreeExists(java.lang.String genericName,
int index)
convenience method to check if requested subtree exists (as identified by genericName String and int index). |
abstract AbstractDataPackage |
upload(java.lang.String id,
boolean updatePackageId)
Copies the AbstractDataPackage with the indicated id from the local file store to Metacat |
Methods inherited from class edu.ucsb.nceas.morpho.datapackage.MetadataObject |
getGenericValue, getMetadataNode, getMetadataPath, getXPathValue, main, setGenericValue, setMetadataNode, setMetadataPath, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.String location
protected java.lang.String id
protected ConfigXML config
protected java.io.File dataPkgFile
protected FileSystemDataStore fileSysDataStore
protected MetacatDataStore metacatDataStore
protected java.lang.String initialId
protected Entity[] entityArray
public static final java.lang.String METACAT
public static final java.lang.String LOCAL
public static final java.lang.String BOTH
Constructor Detail |
public AbstractDataPackage()
Method Detail |
public abstract void serialize(java.lang.String location) throws MetacatUploadException
location
- String
MetacatUploadException
public abstract void load(java.lang.String location, java.lang.String identifier, Morpho morpho)
location
- Stringidentifier
- Stringmorpho
- Morphopublic abstract AbstractDataPackage upload(java.lang.String id, boolean updatePackageId) throws MetacatUploadException
id
- String
MetacatUploadException
public abstract AbstractDataPackage download(java.lang.String id)
id
- String
protected java.io.File getFileWithID(java.lang.String ID, Morpho morpho) throws java.lang.Throwable
java.lang.Throwable
public void setInitialId(java.lang.String initId)
public java.lang.String getInitialId()
public java.lang.String getLocation()
public void setLocation(java.lang.String location)
location
- Stringpublic java.lang.String getTitle()
public java.lang.String getAuthor()
public java.lang.String getAccessionNumber()
public java.lang.String getPackageId()
public void setAccessionNumber(java.lang.String id)
id
- Stringpublic java.lang.String getKeywords()
public boolean subtreeExists(java.lang.String genericName, int index)
genericName
- Stringindex
- int
public org.w3c.dom.Node getSubtree(java.lang.String genericName, int index)
genericName
- Stringindex
- int
public java.util.List getSubtrees(java.lang.String genericName)
genericName
- String
public abstract org.w3c.dom.Node getSubtreeAtReference(java.lang.String refID)
refID
- unique String refID
public abstract org.w3c.dom.Node getSubtreeAtReferenceNoClone(java.lang.String refID)
refID
- unique String refID
public abstract org.w3c.dom.Node replaceSubtreeAtReference(java.lang.String refID, org.w3c.dom.Node newSubtreeRoot)
refID
- unique String refID. Note that the new subtree will be given
the same refID as the subtree it replaces, even if the newSubtreeRoot
node has a different id setnewSubtreeRoot
- Node
public abstract java.util.List getSubtreesThatReference(java.lang.String refID)
refID
- unique String refID
public java.util.List deleteAllSubtrees(java.lang.String genericName)
genericName
- String
public org.w3c.dom.Node getSubtreeNoClone(java.lang.String genericName, int index)
genericName
- Stringindex
- int
public java.util.List getIDsForNodesWithName(java.lang.String genericName)
java.util.List
containing IDs of all the rootnodes
of all the subtrees identified by the passed unique String. Returns an
empty string if none found. NOTE - should never return null
genericName
- string identifying nodes - e.g. "parties"
java.util.List
containing IDs of all the rootnodes
of all the subtrees identified by the passed unique String. Returns an
empty List if none found. NOTE - should never return nullpublic java.lang.String getNewUniqueReferenceID()
public org.w3c.dom.Node insertSubtree(java.lang.String genericName, org.w3c.dom.Node subtreeRootNode, int index)
genericName
- Stringindex
- int (zero relative). NOTE that subtree will be inserted before
this index if a subtree already exists there
public org.w3c.dom.Node deleteSubtree(java.lang.String genericName, int index)
genericName
- Stringindex
- int (zero relative)
public org.w3c.dom.Node replaceSubtree(java.lang.String genericName, org.w3c.dom.Node newSubtreeRootNode, int index)
genericName
- StringnewSubtreeRootNode
- the new subtree root Nodeindex
- int (zero relative)
public org.w3c.dom.Node getCoverageNode()
public org.w3c.dom.NodeList getGeographicNodeList()
public void removeGeographicNodes()
public org.w3c.dom.NodeList getTemporalNodeList()
public void removeTemporalNodes()
public org.w3c.dom.NodeList getTaxonomicNodeList()
public void removeTaxonomicNodes()
public void insertCoverage(org.w3c.dom.Node covSubtree)
public Entity[] getEntityArray()
public java.lang.String getEntityName(int entNum)
entNum
- int
public int getEntityIndex(java.lang.String entName)
entName
- String - name of the Entity whose index in the entity array is
required
public java.lang.String getEntityNumRecords(int entNum)
entNum
- int
public int getEntityCount()
public int getAttributeCountForAnEntity(int entityIndex)
entityIndex
- the index of the entity whose attribute count is desired
public void setEntityNumRecords(int entNum, java.lang.String numRecS)
entNum
- intnumRecS
- Stringpublic java.lang.String getEntityDescription(int entNum)
entNum
- int
public java.lang.String getEntityID(int entNum)
entNum
- the entity Index of the entity whose ID is required
public void setEntityID(int entNum, java.lang.String ID)
entNum
- the entity Index of the entity whose ID is requiredID
- the unique ID for this entitypublic void deleteEntity(int entNum)
entNum
- intpublic void deleteAllEntities()
public void addEntity(Entity entity)
entity
- Entitypublic void insertEntity(Entity entity, int pos)
entity
- Entitypos
- intpublic org.w3c.dom.Node[] getAttributeArray(int entityIndex)
public void deleteAttribute(int entityIndex, int attributeIndex)
public org.w3c.dom.Node appendAdditionalMetadata(org.w3c.dom.Node addtMetadata)
public void loadCustomUnits()
public java.lang.String[] getUnitDictionaryCustomUnitTypes()
public java.lang.String[] getUnitDictionaryUnitsOfType(java.lang.String type)
public static void insertObjectIntoArray(java.lang.Object[] arr, java.lang.Object value, java.lang.Object[] newArr)
public boolean isNewCustomUnit(java.lang.String type, java.lang.String unit)
public void addNewUnit(java.lang.String unitType, java.lang.String unit)
public void insertAttribute(int entityIndex, Attribute newAttr, int attrIndex)
public java.lang.String getAttributeName(int entityIndex, int attributeIndex)
public int getAttributeIndex(int entityIndex, java.lang.String attributeName)
entityIndex
- the index of the entity thats contains the given attributeattributeName
- the name of the attribute whose index is required
public java.lang.String getAttributeID(int entityIndex, int attributeIndex)
public java.lang.String getAttributeDataType(int entityIndex, int attributeIndex)
public java.lang.String getAttributeUnit(int entityIndex, int attributeIndex)
public org.w3c.dom.Node[] getPhysicalArray(int entityIndex)
public java.lang.String getPhysicalName(int entityIndex, int physicalIndex)
public java.lang.String getPhysicalFormat(int entityIndex, int physicalIndex)
public java.lang.String getPhysicalSize(int entityIndex, int physicalIndex)
public void setPhysicalSize(int entityIndex, int physicalIndex, java.lang.String sizeS)
public java.lang.String getPhysicalFieldDelimiter(int entityIndex, int physicalIndex)
public abstract boolean ignoreConsecutiveDelimiters(int entityIndex, int physicalIndex)
public void setPhysicalFieldDelimiter(int entityIndex, int physicalIndex, java.lang.String delim)
public java.lang.String getPhysicalNumberHeaderLines(int entityIndex, int physicalIndex)
public java.lang.String getEncodingMethod(int entityIndex, int physicalIndex)
public java.lang.String getCompressionMethod(int entityIndex, int physicalIndex)
public org.w3c.dom.Node[] getDistributionArray(int entityIndex, int physicalIndex)
public java.lang.String getDistributionInlineData(int entityIndex, int physicalIndex, int distIndex)
public java.lang.String getDistributionUrl(int entityIndex, int physicalIndex, int distIndex)
public void setDistributionUrl(int entityIndex, int physicalIndex, int distIndex, java.lang.String urlS)
public void serializeData() throws MetacatUploadException
MetacatUploadException
public void export(java.lang.String path)
path
- the path to which this package should be exported.public void exportToZip(java.lang.String path)
path
- the path to export the zip file topublic void exportDataFiles(java.lang.String path)
public void delete(java.lang.String location) throws java.lang.Exception
java.lang.Exception
public void showPackageSummary()
public java.io.Reader openAsReader(java.lang.String id) throws DocumentNotFoundException
XMLFactoryInterface
openAsReader
in interface XMLFactoryInterface
id
- a unique identifier used to determine what resource to return
DocumentNotFoundException
- if id does not point to a document, or
if requested document exists but cannot be accessed.public org.w3c.dom.Document openAsDom(java.lang.String id)
XMLFactoryInterface
openAsDom
in interface XMLFactoryInterface
id
- a unique identifier used to determine what resource to returnpublic void addAttributeForImport(java.lang.String entityName, java.lang.String attributeName, java.lang.String scale, OrderedMap omap, java.lang.String xPath, boolean newTable)
public java.lang.String getCurrentImportEntityName()
public java.lang.String getCurrentImportAttributeName()
public java.lang.String getCurrentImportScale()
public OrderedMap getCurrentImportMap()
public OrderedMap getSecondImportMap()
public java.lang.String getCurrentImportXPath()
public boolean isCurrentImportNewTable()
public int getAttributeImportCount()
public void removeAttributeForImport()
public void setLastImportedEntity(java.lang.String name)
public void setLastImportedDataSet(java.util.Vector data)
public void setLastImportedAttributes(java.util.List attr)
public java.lang.String getLastImportedEntity()
public java.util.List getLastImportedAttributes()
public java.util.Vector getLastImportedDataSet()
public Entity[] getOriginalEntityArray()
public void setOriginalEntityArray(Entity[] arr)
public void clearAllAttributeImports()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |