public class FederatedDocumentReader extends Object implements DocumentReader
DocumentReader that be used to obtain "semantic" information from
a federated document| Constructor and Description |
|---|
FederatedDocumentReader(DocumentTranslator translator,
Document federatedDocument) |
| Modifier and Type | Method and Description |
|---|---|
Document |
document()
Returns the underlying document instance.
|
Integer |
getCacheTtlSeconds()
Returns the number of seconds that the underlying document should be cached by the repository, if any.
|
List<Document> |
getChildren()
Returns the list of children the underlying document has.
|
LinkedHashMap<String,Name> |
getChildrenMap()
Returns an ordered map of (childId, childName) the underlying document has.
|
String |
getDocumentId()
Returns the id of the underlying document.
|
Set<String> |
getMixinTypeNames()
Returns a set with the names of the primary types of the underlying document.
|
Set<Name> |
getMixinTypes()
Returns a set with the names of the primary types of the underlying document.
|
List<String> |
getParentIds()
Returns the list of identifiers of the parents of the underlying document.
|
Name |
getPrimaryType()
Returns name of the primary type of the underlying document.
|
String |
getPrimaryTypeName()
Returns the name of primary type of the underlying document.
|
Map<Name,Property> |
getProperties()
Returns all the properties of the underlying document.
|
Property |
getProperty(Name name)
Returns the property which has the given name, or null if there is no such property.
|
Property |
getProperty(String name)
Returns the property which has the given name, or null if there is no such property.
|
public FederatedDocumentReader(DocumentTranslator translator, Document federatedDocument)
public String getDocumentId()
DocumentReadergetDocumentId in interface DocumentReadernon-null Stringpublic List<String> getParentIds()
DocumentReadergetParentIds in interface DocumentReadernon-null Listpublic List<Document> getChildren()
DocumentReadergetChildren in interface DocumentReadernon-null Listpublic LinkedHashMap<String,Name> getChildrenMap()
DocumentReaderThe returned map does not contain any explicit same name sibling information, so a connector interested in that would have to do its own, custom processing.
getChildrenMap in interface DocumentReadernon-null LinkedHashMappublic Name getPrimaryType()
DocumentReadergetPrimaryType in interface DocumentReadernon-null Namepublic Set<Name> getMixinTypes()
DocumentReadergetMixinTypes in interface DocumentReadernon-null Setpublic String getPrimaryTypeName()
DocumentReadergetPrimaryTypeName in interface DocumentReadernon-null Stringpublic Set<String> getMixinTypeNames()
DocumentReadergetMixinTypeNames in interface DocumentReadernon-null Setpublic Map<Name,Property> getProperties()
DocumentReadergetProperties in interface DocumentReadernon-null Map of (property name, property value) pairs.public Property getProperty(Name name)
DocumentReadergetProperty in interface DocumentReadername - a non-null NameProperty instance or nullpublic Property getProperty(String name)
DocumentReadergetProperty in interface DocumentReadername - a non-null NameProperty instance or nullpublic Document document()
DocumentReaderdocument in interface DocumentReadernon-null Document instance.public Integer getCacheTtlSeconds()
DocumentReadergetCacheTtlSeconds in interface DocumentReaderInteger. If null, it means that there isn't a special requirement for the
underlying document.Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.