|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.replication.unit.Manifest
This class contains data and functionality for a WTUnit manifest file.
A manifest file contains a unit descriptions, as well a unit metadat
and content files.
Supported API: false
Extendable: false
Nested Class Summary | |
(package private) class |
Manifest.DescriptorEnumerator
|
(package private) class |
Manifest.UnitContentEnumerator
|
Field Summary | |
private static String |
CLASSNAME
|
private static String |
CODEBASE
|
static String |
DOCTYPE_TAG
|
static String |
MANIFEST_DIR
|
static String |
MANIFEST_FILENAME
|
private int |
numContentEl
|
private int |
numMetadataEl
|
private static WTProperties |
properties
|
private static String |
RESOURCE
|
private static String[] |
shifts
|
static String |
UFID
|
private WTUnit |
unit
|
static String |
UNIT_CONTENT
|
static String |
UNIT_CONTENT_URL
|
static String |
UNIT_CREATED
|
static String |
UNIT_CREATED_AT
|
static String |
UNIT_CREATED_BY
|
static String |
UNIT_CREATOR
|
static String |
UNIT_DESCRIPTION
|
static String |
UNIT_MANIFEST
|
static String |
UNIT_METADATA
|
static String |
UNIT_METADATA_URL
|
static String |
UNIT_NAME
|
static String |
UNIT_NUMBER
|
static String |
UNIT_TAG
|
static String |
UNIT_TEAMTEMPLATE_DOMAIN
|
static String |
UNIT_TEAMTEMPLATE_NAME
|
static String |
UNIT_VERSION
|
private static boolean |
VERBOSE
|
Constructor Summary | |
Manifest(WTUnit unit)
This constructor initializes the "unit" instance variables. |
Method Summary | |
long |
addContent(ContentItem ci)
A caller passes a contentItem instance. |
long |
addContent(ContentItem ci,
String fileName)
|
Streamed |
addMetadata(InputStream is,
String descriptor)
This method creates an ApplicationData for this class's WTUnit, sets the ApplicationData attributes and updates this unit's content. |
void |
createManifestDomTree()
This method queries the unit for ApplicationData corresponding to ContentRoleType.SECONDARY, which include both content files and metadata, and creates the manifest DOM tree, based on the results of the query. |
void |
deleteManifestFromUnit()
This method crreates a QueryResult object representing the result of searching the unit for a manifest object. |
void |
deleteManifestFromUnit(QueryResult qr)
This method gets a QueryResult object representing the result of searching the unit for a manifest object. |
void |
fillUnitSecondaryFields()
This metod parses the manifest object, retrived its secondary fields and sets their values to the unit. |
ApplicationData |
getApplicationDataByStreamId(long streamId)
|
Streamed |
getContentItem(long streamId)
This method queries the unit for ApplicationData corresponding to the description "content". |
private QueryResult |
getManifestQueryResult()
This method returns a QueryResult object that is the result of searching the unit for a manifest, which is the unit's primary content. |
Streamed |
getMetadata(String descriptor)
This method queries the unit for ApplicationData corresponding to the description "metadata". |
Enumeration |
getMetadataList()
this method queries the unit for ApplicacationData , corresponding to the description "metadata", and returns the DescriptorEnumerator for the results of this query. |
private String |
getShift(int level)
Returns an indentation blank string based on the the level of indentation. |
Enumeration |
getUnitContentList()
This method queries the unit for ApplicationData corresponding to the description "metadata" and description "content". |
void |
writeDomTreeToManifest(Node node,
PrintWriter out,
int level,
boolean indented)
This method writes the DOM tree created by the createManifestDomTree() method to the manifest PrintWriter output stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private WTUnit unit
public static final String DOCTYPE_TAG
public static final String UNIT_TAG
public static final String UNIT_NAME
public static final String UNIT_NUMBER
public static final String UNIT_CREATED
public static final String UNIT_CREATED_AT
public static final String UNIT_CREATED_BY
public static final String UNIT_METADATA
public static final String UNIT_METADATA_URL
public static final String UNIT_CREATOR
public static final String UNIT_VERSION
public static final String UNIT_CONTENT
public static final String UNIT_CONTENT_URL
public static final String UNIT_MANIFEST
public static final String UNIT_DESCRIPTION
public static final String UNIT_TEAMTEMPLATE_NAME
public static final String UNIT_TEAMTEMPLATE_DOMAIN
public static final String MANIFEST_FILENAME
public static final String UFID
public static final String MANIFEST_DIR
private static final String[] shifts
private int numMetadataEl
private int numContentEl
private static WTProperties properties
private static String CODEBASE
private static boolean VERBOSE
Constructor Detail |
public Manifest(WTUnit unit)
unit
- Method Detail |
public long addContent(ContentItem ci) throws WTException, WTPropertyVetoException
ci
-
WTException
WTPropertyVetoException
public Streamed addMetadata(InputStream is, String descriptor) throws WTException, PropertyVetoException, FileNotFoundException, IOException
is
- descriptor
-
WTException
PropertyVetoException
FileNotFoundException
IOException
public Streamed getContentItem(long streamId) throws WTException
streamId
-
WTException
public Enumeration getMetadataList() throws WTException
WTException
public void createManifestDomTree() throws WTException, PropertyVetoException, FileNotFoundException, IOException
WTException
PropertyVetoException
FileNotFoundException
IOException
public void writeDomTreeToManifest(Node node, PrintWriter out, int level, boolean indented)
node
- out
- level
- indented
- public Streamed getMetadata(String descriptor) throws WTException
descriptor
-
WTException
public Enumeration getUnitContentList() throws WTException
WTException
private String getShift(int level)
level
-
private QueryResult getManifestQueryResult() throws WTException
WTException
public void deleteManifestFromUnit(QueryResult qr) throws WTException
qr
-
WTException
public void deleteManifestFromUnit() throws WTException
WTException
public void fillUnitSecondaryFields() throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
public ApplicationData getApplicationDataByStreamId(long streamId) throws WTException
WTException
public long addContent(ContentItem ci, String fileName) throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |