de.init.its.api.spi
Interface IitsElementManager

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
ItsElementManager

public interface IitsElementManager
extends java.io.Serializable

Service interface for managing the mapping between LibreoFfice text documents and ITS Tag elements

Author:
mkandora

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
 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
 

Method Detail

reset

void reset()
UNSAFE OP! REMOVE


insert

IitsTagElement insert(ItsAttributes attrib,
                      java.lang.String... params)
Inserts an ITS Local Attribute into a document hiearchy

Parameters:
attrib - the ItsAttributes prefigured constant
params - ITS Attribute values

insert

IitsTagElement insert(java.util.Map<ItsAttributes,java.util.List<java.lang.String>> values)
Inserts a new IitsTagElement using the provided values

Parameters:
values - a mapping between ItsAttributes and a list of values
Returns:
the newly inserted IitsTagElement

insert

IitsTagElement insert(java.lang.String dcname,
                      java.lang.String dcvalue)
Inserts an ITS Local Attribute into a document hierarchy

Parameters:
dcname - the name of the data category to insert.
dcvalue - the value of the data category
Returns:
a new IitsTagElement

insert

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

Parameters:
id - the parent element id
dcname - the data category nane
dcvalue - the data category value
Returns:

insert

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

Parameters:
id - the IitsId
dcname - the data category name
dcvalue - the data category value
Returns:
See Also:
insert(String, String, String)

remove

IitsTagElement remove(java.lang.String id)
Removes an 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

Returns:
the removed IitsTagElement

getItsElement

IitsTagElement getItsElement(java.lang.String id)
returns an ITS tag element with its id

Parameters:
id -
Returns:

findAll

java.util.List<IitsTagElement> findAll()

Returns all managed IitsTagElement

Returns:

findByAttribute

java.util.List<IitsTagElement> findByAttribute(IitsAttribute attribute)
returns all its tag elements, that match a certain ITS attribute

Returns:

findByAttributeName

java.util.List<IitsTagElement> findByAttributeName(java.lang.String attributeName)
Returns all Its Tag Elements, that match a certain attribute name

Parameters:
attributeName -
Returns:

findById

IitsTagElement findById(java.lang.String id)
Returns an IitsTagElement with a given id

Parameters:
id - the Identifier as String
Returns:
the IitsTagElement

findById

IitsTagElement findById(IitsId id)
Returns an IitsTagElement with a given id

Parameters:
id - the Identifier as IitsId
Returns:
an IitsTagElement

getIdReferenceAttributeName

java.lang.String getIdReferenceAttributeName()
Returns the internally used tag attribute name in ODT File to resolve ITS Tags

Returns:

setIdReferenceAttributeName

void setIdReferenceAttributeName(java.lang.String name)
Sets the default tag attribute name for ODT files to resolve ITS tags

Parameters:
name -

updateId

void updateId(java.lang.String id)
              throws java.lang.Exception
Updates the Id

Parameters:
id -
Throws:
java.lang.Exception

setItsDocument

void setItsDocument(ItsDocument document)
Sets the currently available ItsDocument

Parameters:
document - an ItsDocument

getItsDocument

ItsDocument getItsDocument()
Returns the underlying Its Document

Returns:
ItsDocument

getErrors

java.util.List<ItsError> getErrors()
Returns a list of errors

Returns:

hasErrors

boolean hasErrors()
Returns true, if there were error during its tag processing

Returns:

clearErrors

void clearErrors()
Clears all possible errors