public class FederatedDocumentReader extends Object implements DocumentReader
DocumentReader
that be used to obtain "semantic" information from
a federated documentConstructor and Description |
---|
FederatedDocumentReader(DocumentTranslator translator,
Document federatedDocument) |
Modifier and Type | Method and Description |
---|---|
Document |
document()
Returns the underlying document instance.
|
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.
|
boolean |
isCacheable()
Returns whether the document should be cached by the repository or not.
|
boolean |
isQueryable()
Determine whether the document is considered queryable.
|
public FederatedDocumentReader(DocumentTranslator translator, Document federatedDocument)
public String getDocumentId()
DocumentReader
getDocumentId
in interface DocumentReader
non-null
String
public List<String> getParentIds()
DocumentReader
getParentIds
in interface DocumentReader
non-null
List
public List<Document> getChildren()
DocumentReader
getChildren
in interface DocumentReader
non-null
List
public LinkedHashMap<String,Name> getChildrenMap()
DocumentReader
The 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 DocumentReader
non-null
LinkedHashMap
public Name getPrimaryType()
DocumentReader
getPrimaryType
in interface DocumentReader
non-null
Name
public Set<Name> getMixinTypes()
DocumentReader
getMixinTypes
in interface DocumentReader
non-null
Set
public String getPrimaryTypeName()
DocumentReader
getPrimaryTypeName
in interface DocumentReader
non-null
String
public Set<String> getMixinTypeNames()
DocumentReader
getMixinTypeNames
in interface DocumentReader
non-null
Set
public Map<Name,Property> getProperties()
DocumentReader
getProperties
in interface DocumentReader
non-null
Map
of (property name, property value) pairs.public Property getProperty(Name name)
DocumentReader
getProperty
in interface DocumentReader
name
- a non-null
Name
Property
instance or null
public Property getProperty(String name)
DocumentReader
getProperty
in interface DocumentReader
name
- a non-null
Name
Property
instance or null
public Document document()
DocumentReader
document
in interface DocumentReader
non-null
Document
instance.public boolean isCacheable()
DocumentReader
isCacheable
in interface DocumentReader
public boolean isQueryable()
DocumentReader
isQueryable
in interface DocumentReader
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.