|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.sequencer.teiid.XmiGraphReader
public class XmiGraphReader
A class that can be used to read an XMI file that has been imported into a graph.
Field Summary | |
---|---|
protected ValueFactory<Boolean> |
booleanFactory
|
protected ExecutionContext |
context
|
protected String |
currentNamespaceUri
|
protected static Map<String,String> |
EDATATYPE_TO_JCR_TYPENAME
|
protected boolean |
generateShortNames
|
protected Inflector |
inflector
|
protected NameFactory |
nameFactory
|
protected NamespaceRegistry |
namespaces
|
protected PathFactory |
pathFactory
|
protected PropertyFactory |
propertyFactory
|
protected ValueFactory<String> |
stringFactory
|
protected Subgraph |
subgraph
|
protected Map<Name,Name> |
typeNameReplacements
|
protected UuidFactory |
uuidFactory
|
protected ValueFactories |
valueFactories
|
Constructor Summary | |
---|---|
protected |
XmiGraphReader(Subgraph subgraph,
boolean generateShortNames)
|
Method Summary | |
---|---|
protected String |
firstValue(Node node,
Name propertyName)
|
protected String |
firstValue(Node node,
Name propertyName,
String defaultValue)
|
protected String |
firstValue(Node node,
String propertyName)
|
protected boolean |
firstValue(Node node,
String propertyName,
boolean defaultValue)
|
protected double |
firstValue(Node node,
String propertyName,
double defaultValue)
|
protected long |
firstValue(Node node,
String propertyName,
long defaultValue)
|
protected String |
firstValue(Node node,
String propertyName,
String defaultValue)
|
String |
getCurrentNamespaceUri()
Get the current namespace URI. |
protected String |
jcrTypeNameFor(Name dataType)
|
protected Name |
nameForHref(Name eObjectReferenceName)
Determine the name of the property that is used to hold the "href" URL literal value of the EObject reference. |
protected Name |
nameForResolvedId(Name eObjectReferenceName)
Determine the name of the property that is used to hold the identifier(s) for the resolved EObject reference. |
protected Name |
nameForResolvedName(Name eObjectReferenceName)
Determine the name of the property that is used to hold the name(s) for the resolved EObject reference. |
protected Name |
nameForResolvedReference(Name eObjectReferenceName)
Determine the name of the property that is used to hold the WEAKREFERENCE values for the resolved EObject reference. |
protected Name |
nameFrom(Name name)
|
protected Name |
nameFrom(String name)
|
protected List<Name> |
names(Node node,
String propertyName,
String regexDelimiter)
|
protected String |
namespacePrefix(String prefix)
|
protected Path |
path(Path parent,
Name name)
|
protected Path |
path(Path parent,
Name name,
int snsIndex)
|
protected Path |
path(Path parent,
Path.Segment segment)
|
protected Path |
path(Path parent,
String relativePath)
|
protected Path |
pathFrom(Object path)
|
protected Property |
property(Name name,
Object... values)
|
protected Property |
property(Name name,
PropertyType type,
Object... values)
|
protected List<UUID> |
references(Property property)
Extracts the "mmuuid" values from the property if the property is indeed an XMI reference to local objects. |
protected Path |
relativePathFrom(Name... names)
|
protected void |
replaceTypeName(Name replaced,
Name with)
|
protected void |
replaceTypeName(String replaced,
String with)
|
protected void |
setCurrentNamespaceUri(String uri)
|
protected Name |
shortenName(Name name)
|
protected String |
stringFrom(Object value)
|
protected Name |
typeNameFrom(Name name)
|
protected UUID |
uuidFor(Node node)
|
protected List<String> |
values(Node node,
String propertyName,
String regexDelimiter)
|
protected UUID |
xmiUuidFor(Node node)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Map<String,String> EDATATYPE_TO_JCR_TYPENAME
protected final ExecutionContext context
protected final ValueFactories valueFactories
protected final ValueFactory<String> stringFactory
protected final ValueFactory<Boolean> booleanFactory
protected final NameFactory nameFactory
protected final PathFactory pathFactory
protected final UuidFactory uuidFactory
protected final PropertyFactory propertyFactory
protected final Subgraph subgraph
protected final NamespaceRegistry namespaces
protected final Inflector inflector
protected final boolean generateShortNames
protected String currentNamespaceUri
protected final Map<Name,Name> typeNameReplacements
Constructor Detail |
---|
protected XmiGraphReader(Subgraph subgraph, boolean generateShortNames)
Method Detail |
---|
protected void replaceTypeName(Name replaced, Name with)
protected void replaceTypeName(String replaced, String with)
protected void setCurrentNamespaceUri(String uri)
public String getCurrentNamespaceUri()
protected String namespacePrefix(String prefix)
protected String firstValue(Node node, Name propertyName)
protected String firstValue(Node node, Name propertyName, String defaultValue)
protected String firstValue(Node node, String propertyName)
protected String firstValue(Node node, String propertyName, String defaultValue)
protected boolean firstValue(Node node, String propertyName, boolean defaultValue)
protected long firstValue(Node node, String propertyName, long defaultValue)
protected double firstValue(Node node, String propertyName, double defaultValue)
protected List<String> values(Node node, String propertyName, String regexDelimiter)
protected List<Name> names(Node node, String propertyName, String regexDelimiter)
protected String jcrTypeNameFor(Name dataType)
protected Path pathFrom(Object path)
protected Path relativePathFrom(Name... names)
protected Path path(Path parent, Name name)
protected Path path(Path parent, String relativePath)
protected Path path(Path parent, Name name, int snsIndex)
protected Path path(Path parent, Path.Segment segment)
protected Property property(Name name, Object... values)
protected Property property(Name name, PropertyType type, Object... values)
protected Name nameFrom(String name)
protected Name nameFrom(Name name)
protected Name typeNameFrom(Name name)
protected Name nameForHref(Name eObjectReferenceName)
The resulting name fits one of two patterns, depending upon whether the local part
of the
reference name is singular or plural. If singular, then the resulting name will have "Href" appended to the
local part
of the supplied name. If plural, then the resulting name will consist of the
singularlized local part
appended with "Hrefs". In all cases, the
namespace URI
of the resulting name will match that of the supplied name.
eObjectReferenceName
- the name of the normal EObject reference property, which is typically a href
protected Name nameForResolvedReference(Name eObjectReferenceName)
This method just returns the name without modification.
eObjectReferenceName
- the name of the normal EObject reference property, which is typically a href
protected Name nameForResolvedName(Name eObjectReferenceName)
The resulting name fits one of two patterns, depending upon whether the local part
of the
reference name is singular or plural. If singular, then the resulting name will have "Name" appended to the
local part
of the supplied name. If plural, then the resulting name will consist of the
singularlized local part
appended with "Names". In all cases, the
namespace URI
of the resulting name will match that of the supplied name.
eObjectReferenceName
- the name of the normal EObject reference property, which is typically a href
protected Name nameForResolvedId(Name eObjectReferenceName)
The resulting name fits one of two patterns, depending upon whether the local part
of the
reference name is singular or plural. If singular, then the resulting name will have "XmiUuid" appended to the
local part
of the supplied name. If plural, then the resulting name will consist of the
singularlized local part
appended with "XmiUuids". In all cases, the
namespace URI
of the resulting name will match that of the supplied name.
eObjectReferenceName
- the name of the normal EObject reference property, which is typically a href
protected String stringFrom(Object value)
protected Name shortenName(Name name)
protected UUID uuidFor(Node node)
protected UUID xmiUuidFor(Node node)
protected List<UUID> references(Property property)
property
- the property
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |