|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.oclc.da.gdfr.registryprototype.pvt.BasicStructuredObject
public class BasicStructuredObject
| Constructor Summary | |
|---|---|
BasicStructuredObject(java.lang.String bytes,
java.util.Properties xPaths)
Constructor |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Clones this object. |
AdminData |
getAdminData()
Gets the admin data associated with this object |
java.lang.Object[] |
getAttr(java.lang.String attr)
Gets the attribute associated with the given key |
java.lang.String |
getBytestream()
Returns the bytestream associated with this object |
java.lang.String |
getContentType()
Gets the content type of this data object |
Content |
getPayload()
Return the content associated with this object |
Ref |
getRef()
Get a Ref of this CollectionItem |
java.util.Properties |
modifyPathProperties(java.util.Properties oldProps,
java.lang.String oldPath)
Adjust the XPaths in a given Properties Object to reflect the element reached by the given XPath now being the root element. |
boolean |
setAdminData(AdminData data)
Sets the admin data of this object |
boolean |
setAttr(java.lang.String attr,
java.lang.String val)
Sets the given attribute with the given text value |
boolean |
setAttr(java.lang.String attr,
java.lang.String[] vals)
Set the attribute defined by attr with the values specified in vals |
boolean |
setAttr(java.lang.String attr,
StructuredDataObject obj)
Sets a complex element into the object |
boolean |
setAttr(java.lang.String attr,
StructuredDataObject[] objs)
Sets a set of complex element into the object |
boolean |
setBytestream(java.lang.String s)
Sets the bytestream of this object |
boolean |
setPayload(Content data)
Sets the Payload (content) of this object |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicStructuredObject(java.lang.String bytes,
java.util.Properties xPaths)
bytes - the bytestream of the itemxPaths - A Properties object containg key/value pairs
of attr_name/path_to_attr
These properties MUST include:
1) "guid"/path_to_guid
2) "content"/path_to_content
3) "admin"/path_to_admin
4) "content_type"/path_to_content_type
5) "indexes"/path_to_indexes
6) "index_name"/path_to_index_name
6) "index_path"/path_to_index_path
7) "content_root"/content_root_element_name
8) "index_type"/path_to_index_type| Method Detail |
|---|
public java.lang.Object clone()
clone in class java.lang.Object
public AdminData getAdminData()
throws RegistrySystemException
getAdminData in interface CollectionItemRegistrySystemException - if attribute is missingpublic java.lang.Object[] getAttr(java.lang.String attr)
getAttr in interface StructuredDataObjectattr - The name of the attribute to get
RegistrySystemException - if the specified attribute does not
exist in the object's Propertiespublic java.lang.String getBytestream()
getBytestream in interface DataObject
public Content getPayload()
throws RegistrySystemException
getPayload in interface CollectionItemRegistrySystemException - if attribute is missingpublic java.lang.String getContentType()
RegistrySystemException - if the attribute "content_type" is
not part of this object's Propertiespublic Ref getRef()
getRef in interface CollectionItempublic boolean setAdminData(AdminData data)
setAdminData in interface CollectionItemdata - The AdminData to set
RegistrySystemException - if the attribute "admin" is not
in this object's Properties
public boolean setAttr(java.lang.String attr,
java.lang.String val)
setAttr in interface StructuredDataObjectattr - The attribute to setval - The text value to assign
RegistrySystemException - if the provided attr is not in
this object's Properties
public boolean setAttr(java.lang.String attr,
java.lang.String[] vals)
setAttr in interface StructuredDataObjectattr - String name of the attribute to setvals - Values to assign to the attribute
public boolean setAttr(java.lang.String attr,
StructuredDataObject obj)
setAttr in interface StructuredDataObjectattr - The attribute to setobj - The StructuredDataObject to use as data
RegistrySystemException - if the provided attr is not in
this object's Properties
public boolean setAttr(java.lang.String attr,
StructuredDataObject[] objs)
setAttr in interface StructuredDataObjectattr - The elements to setobjs - The StructuredDataObjects to use as data
RegistrySystemException - if the provided attr is not in
this object's Propertiespublic boolean setBytestream(java.lang.String s)
setBytestream in interface DataObjects - The bytestream to set
public boolean setPayload(Content data)
setPayload in interface CollectionItemdata - The Content to set
public java.util.Properties modifyPathProperties(java.util.Properties oldProps,
java.lang.String oldPath)
oldProps - the original Properties Object containing XPathsoldPath - The path to the element that is the new root element
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||