org.modeshape.sequencer.teiid
Class XmiModelReader
java.lang.Object
org.modeshape.sequencer.teiid.XmiGraphReader
org.modeshape.sequencer.teiid.XmiModelReader
@NotThreadSafe
public class XmiModelReader
- extends XmiGraphReader
Fields inherited from class org.modeshape.sequencer.teiid.XmiGraphReader |
booleanFactory, context, currentNamespaceUri, EDATATYPE_TO_JCR_TYPENAME, generateShortNames, inflector, nameFactory, namespaces, pathFactory, propertyFactory, stringFactory, subgraph, typeNameReplacements, uuidFactory, valueFactories |
Constructor Summary |
XmiModelReader(Path parentPath,
Name modelName,
String pathToModelFile,
Subgraph subgraph,
boolean generateShortTypeNames,
boolean useXmiUuidsAsJcrUuids,
VdbModel vdbModel)
Create a reader for XMI model files. |
Methods inherited from class org.modeshape.sequencer.teiid.XmiGraphReader |
firstValue, firstValue, firstValue, firstValue, firstValue, firstValue, firstValue, getCurrentNamespaceUri, jcrTypeNameFor, nameForHref, nameForResolvedId, nameForResolvedName, nameForResolvedReference, nameFrom, nameFrom, names, namespacePrefix, path, path, path, path, pathFrom, property, property, references, relativePathFrom, replaceTypeName, replaceTypeName, setCurrentNamespaceUri, shortenName, stringFrom, typeNameFrom, values, xmiUuidFor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ENCODER
protected static final TextEncoder ENCODER
useXmiUuidsAsJcrUuids
protected final boolean useXmiUuidsAsJcrUuids
defaults
protected final DefaultProperties defaults
resolver
protected ReferenceResolver resolver
XmiModelReader
public XmiModelReader(Path parentPath,
Name modelName,
String pathToModelFile,
Subgraph subgraph,
boolean generateShortTypeNames,
boolean useXmiUuidsAsJcrUuids,
VdbModel vdbModel)
- Create a reader for XMI model files.
- Parameters:
parentPath
- the path under which the model node should be created by this reaader; may be null if the path is to be
determinedmodelName
- the name of the model filepathToModelFile
- the path of the original model filesubgraph
- the subgraph containing the model contentsgenerateShortTypeNames
- true if shorter node type and property type names should be used (where the local part of
'shorter' names will not begin with the prefix), or false if the names should be used as isuseXmiUuidsAsJcrUuids
- true if the 'xmi:uuid' values are to be used as the 'jcr:uuid' values, or false if new UUIDs
should be generated for 'jcr:uuid'; should only be true if a model can appear in a repository workspace only oncevdbModel
- information about the model, or null if the original model file is stand-alone and was not contained in a
VDB
prepare
protected void prepare()
registerHandler
protected void registerHandler(String name,
XmiModelReader.ModelObjectHandler handler)
registerHandler
protected void registerHandler(Name name,
XmiModelReader.ModelObjectHandler handler)
registerDefaultHandler
protected void registerDefaultHandler(XmiModelReader.ModelObjectHandler handler)
clearHandlers
protected void clearHandlers()
setResolver
public void setResolver(ReferenceResolver resolver)
- Parameters:
resolver
- Sets resolver to the specified value.
setSha1Hash
public void setSha1Hash(String sha1)
- Parameters:
sha1
- Sets sha1 to the specified value.
propertiesFor
protected XmiModelReader.PropertySet propertiesFor(UUID mmuuid,
boolean createIfMissing)
uuidFor
protected UUID uuidFor(Node node)
- Overrides:
uuidFor
in class XmiGraphReader
isAcceptedPrimaryMetamodel
public boolean isAcceptedPrimaryMetamodel(String uri)
write
public boolean write(SequencerOutput output)
writePhase0
public boolean writePhase0(SequencerOutput output)
writePhase1
public boolean writePhase1(SequencerOutput output)
writePhase2
public boolean writePhase2(SequencerOutput output)
writePhase3
public boolean writePhase3(SequencerOutput output)
nameFromKey
protected Name nameFromKey(String keyName)
processObject
protected Path processObject(Path parentPath,
SubgraphNode node,
SequencerOutput output)
findHandler
protected XmiModelReader.ModelObjectHandler findHandler(Node node)
createPropertySet
protected XmiModelReader.PropertySet createPropertySet()
Copyright © 2008-2011 JBoss, a division of Red Hat. All Rights Reserved.