Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

Nested Class Summary
`static class` | `XmiModelReader.AnnotationHandler`
`static class` | `XmiModelReader.DefaultModelObjectHandler`
`static class` | `XmiModelReader.ModelImportHandler`
`static interface` | `XmiModelReader.ModelObjectHandler`
`static class` | `XmiModelReader.PropertySet`
`static class` | `XmiModelReader.SkipBranchHandler`
`static class` | `XmiModelReader.SkipNodeHandler`
`static class` | `XmiModelReader.TransformationHandler`

Field Summary
`protected DefaultProperties` | `defaults`
`protected static TextEncoder` | `ENCODER`
`protected ReferenceResolver` | `resolver`
`protected boolean` | `useXmiUuidsAsJcrUuids`

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.

Method Summary
`protected void` | `clearHandlers()`
`protected XmiModelReader.PropertySet` | `createPropertySet()`
`protected XmiModelReader.ModelObjectHandler` | `findHandler(Node node)`
`boolean` | `isAcceptedPrimaryMetamodel(String uri)`
`protected Name` | `nameFromKey(String keyName)`
`protected void` | `prepare()`
`protected Path` | `processObject(Path parentPath, SubgraphNode node, SequencerOutput output)`
`protected XmiModelReader.PropertySet` | `propertiesFor(UUID mmuuid, boolean createIfMissing)`
`protected void` | `registerDefaultHandler(XmiModelReader.ModelObjectHandler handler)`
`protected void` | `registerHandler(Name name, XmiModelReader.ModelObjectHandler handler)`
`protected void` | `registerHandler(String name, XmiModelReader.ModelObjectHandler handler)`
`void` | `setResolver(ReferenceResolver resolver)`
`void` | `setSha1Hash(String sha1)`
`protected UUID` | `uuidFor(Node node)`
`boolean` | `write(SequencerOutput output)`
`boolean` | `writePhase0(SequencerOutput output)`
`boolean` | `writePhase1(SequencerOutput output)`
`boolean` | `writePhase2(SequencerOutput output)`
`boolean` | `writePhase3(SequencerOutput output)`

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`

Field Detail

### ENCODER

    protected static final TextEncoder ENCODER

### useXmiUuidsAsJcrUuids

    protected final boolean useXmiUuidsAsJcrUuids

### defaults

    protected final DefaultProperties defaults

### resolver

    protected ReferenceResolver resolver

Constructor Detail

### 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 determined
    `modelName` - the name of the model file
    `pathToModelFile` - the path of the original model file
    `subgraph` - the subgraph containing the model contents
    `generateShortTypeNames` - 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 is
    `useXmiUuidsAsJcrUuids` - 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 once
    `vdbModel` - information about the model, or null if the original model file is stand-alone and was not contained in a VDB

Method Detail

### 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()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2011 JBoss, a division of Red Hat. All Rights Reserved.