|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.init.its.spi.ItsElementManager
public class ItsElementManager
ITS DataCategory management class. Use this class for all ITS DC Modification Operations. The manager keeps a reference to a ItsDocument, and all available IitsTagElement(s). The internally used structure is tree-like and reflects the nesting of multiple tags inside an odt document file.
Nested Class Summary | |
---|---|
protected static class |
ItsElementManager.ItsTagElementIterator
A generic ITS tag element iterator |
Constructor Summary | |
---|---|
protected |
ItsElementManager()
|
Method Summary | |
---|---|
void |
clearErrors()
Clears all possible errors |
java.util.List<IitsTagElement> |
findAll()
Returns all managed IitsTagElement |
java.util.List<IitsTagElement> |
findByAttribute(IitsAttribute attribute)
returns all its tag elements, that match a certain ITS attribute |
java.util.List<IitsTagElement> |
findByAttributeName(java.lang.String attributeName)
Returns all Its Tag Elements, that match a certain attribute name |
IitsTagElement |
findById(IitsId id)
Returns an IitsTagElement with a given id |
IitsTagElement |
findById(java.lang.String id)
Returns an IitsTagElement with a given id |
java.util.List<ItsError> |
getErrors()
Returns a list of errors |
java.lang.String |
getIdReferenceAttributeName()
Returns the internally used tag attribute name in ODT File to resolve ITS Tags |
ItsDocument |
getItsDocument()
Returns the underlying Its Document |
IitsTagElement |
getItsElement(java.lang.String id)
returns an ITS tag element with its id |
static ItsElementManager |
getManager()
Obtains a singleton instance of the its element manager |
static ItsElementManager |
getManager(boolean init)
|
protected java.lang.Integer |
getNextId()
returns the next available id |
boolean |
hasErrors()
Returns true, if there were error during its tag processing |
IitsTagElement |
insert(IitsId id,
ItsAttributes dcname,
java.lang.String dcvalue)
Inserts an ITS Local Attribute into a document hierarchy using a parent element for nested data categories |
IitsTagElement |
insert(ItsAttributes attrib,
java.lang.String... params)
Inserts an ITS Local Attribute into a document hiearchy |
IitsTagElement |
insert(java.util.Map<ItsAttributes,java.util.List<java.lang.String>> values)
Inserts a new IitsTagElement using the provided values |
IitsTagElement |
insert(java.lang.String dcname,
java.lang.String dcvalue)
Inserts an ITS Local Attribute into a document hierarchy |
IitsTagElement |
insert(java.lang.String id,
java.lang.String dcname,
java.lang.String dcvalue)
Inserts an ITS Local Attribute into a document hierarchy using a parent element for nested data categories |
IitsTagElement |
remove(java.lang.String id)
Removes an IitsTagElement . |
void |
reset()
UNSAFE OP! |
void |
setIdReferenceAttributeName(java.lang.String name)
Sets the default tag attribute name for ODT files to resolve ITS tags |
void |
setItsDocument(ItsDocument document)
Sets the currently available ItsDocument |
void |
updateId(java.lang.String id)
Updates the Id |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ItsElementManager()
Method Detail |
---|
public static ItsElementManager getManager()
public static ItsElementManager getManager(boolean init)
public void reset()
IitsElementManager
reset
in interface IitsElementManager
public void updateId(java.lang.String id) throws java.lang.Exception
IitsElementManager
updateId
in interface IitsElementManager
java.lang.Exception
public IitsTagElement getItsElement(java.lang.String id)
IitsElementManager
getItsElement
in interface IitsElementManager
public IitsTagElement insert(ItsAttributes attrib, java.lang.String... params)
IitsElementManager
insert
in interface IitsElementManager
attrib
- the ItsAttributes
prefigured constantparams
- ITS Attribute valuespublic IitsTagElement insert(IitsId id, ItsAttributes dcname, java.lang.String dcvalue)
IitsElementManager
insert
in interface IitsElementManager
id
- the IitsIddcname
- the data category namedcvalue
- the data category value
IitsElementManager.insert(String, String, String)
public IitsTagElement insert(java.lang.String id, java.lang.String dcname, java.lang.String dcvalue)
IitsElementManager
insert
in interface IitsElementManager
id
- the parent element iddcname
- the data category nanedcvalue
- the data category value
public IitsTagElement insert(java.lang.String dcname, java.lang.String dcvalue)
IitsElementManager
insert
in interface IitsElementManager
dcname
- the name of the data category to insert.dcvalue
- the value of the data category
IitsTagElement
public IitsTagElement insert(java.util.Map<ItsAttributes,java.util.List<java.lang.String>> values)
IitsElementManager
IitsTagElement
using the provided values
insert
in interface IitsElementManager
values
- a mapping between ItsAttributes
and a list of values
IitsTagElement
public IitsTagElement remove(java.lang.String id)
IitsElementManager
IitsTagElement
. The element, if exsisting,
will also be removed from the document tree, resulting all child elements moving
one depth level higher to the next parent element
remove
in interface IitsElementManager
public java.util.List<IitsTagElement> findAll()
IitsElementManager
Returns all managed IitsTagElement
findAll
in interface IitsElementManager
public java.util.List<IitsTagElement> findByAttribute(IitsAttribute attribute)
IitsElementManager
findByAttribute
in interface IitsElementManager
public java.util.List<IitsTagElement> findByAttributeName(java.lang.String attributeName)
IitsElementManager
findByAttributeName
in interface IitsElementManager
public IitsTagElement findById(java.lang.String id)
IitsElementManager
findById
in interface IitsElementManager
id
- the Identifier as String
IitsTagElement
public IitsTagElement findById(IitsId id)
IitsElementManager
findById
in interface IitsElementManager
id
- the Identifier as IitsId
IitsTagElement
public java.lang.String getIdReferenceAttributeName()
IitsElementManager
getIdReferenceAttributeName
in interface IitsElementManager
public void setIdReferenceAttributeName(java.lang.String name)
IitsElementManager
setIdReferenceAttributeName
in interface IitsElementManager
protected java.lang.Integer getNextId()
public void setItsDocument(ItsDocument document)
IitsElementManager
setItsDocument
in interface IitsElementManager
document
- an ItsDocument
public ItsDocument getItsDocument()
IitsElementManager
getItsDocument
in interface IitsElementManager
public java.util.List<ItsError> getErrors()
IitsElementManager
getErrors
in interface IitsElementManager
public boolean hasErrors()
IitsElementManager
hasErrors
in interface IitsElementManager
public void clearErrors()
IitsElementManager
clearErrors
in interface IitsElementManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |