public class Profile
extends java.lang.Object
Implementation note: I'm using dumb and trivial XPath expressions, which might not be optimal...
FIXME: Consider using new XmlSchemaDOM
!
Modifier and Type | Field and Description |
---|---|
static char |
FRAGMENT_SEPARATOR |
static java.lang.String |
TARGET_NS_PREFIX |
static java.lang.String |
XPATH_ATTR_AND_ASSOC_ENDS |
static java.lang.String |
XPATH_CHOICE_ASSOC_ENDS |
static java.lang.String |
XPATH_CLASSES_AND_COMPOUNDS |
static java.lang.String |
XPATH_LITERALS |
static java.lang.String |
XPATH_LOCAL_DOC |
Constructor and Description |
---|
Profile(Config cfg,
java.io.File xsdFile)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.util.List<org.w3c.dom.Element>> |
getAttributesAndAssocEnds() |
java.util.Map<java.lang.String,java.lang.String> |
getCimNamespaces()
Returns namespace information for all model references found in the profile, with prefix as
key, and URI as value.
|
java.util.Collection<java.lang.String> |
getCimPrimitives() |
java.util.Map<java.lang.String,java.util.List<org.w3c.dom.Element>> |
getClassesAndCompounds() |
java.util.Map<java.lang.String,java.util.List<org.tanjakostic.jcleancim.experimental.builder.xsd.ProfileDatatype>> |
getDatatypes() |
java.util.Map<java.lang.String,java.util.List<org.tanjakostic.jcleancim.experimental.builder.xsd.ProfileEnumeration>> |
getEnums() |
java.lang.String |
getEnvelopeName()
Returns envelope name (in instance file, this will be the root element).
|
java.util.Map<java.lang.String,java.util.List<org.w3c.dom.Element>> |
getLiterals() |
java.lang.String |
getName()
Returns profile name (deduced from the file name, without extension); for envelope name, use
getEnvelopeName() . |
java.util.List<XmlNs> |
getNamespaces() |
static java.util.Map<java.lang.String,java.lang.String> |
getPrimitives() |
java.util.List<java.lang.String> |
getSubdirNames()
Returns list of names, deduced from the profile file path.
|
java.util.Map<java.lang.String,java.lang.String> |
getTargetNamespace()
Returns the target namespace information, with prefix "m" as key, and
URI as value.
|
java.util.Set<org.w3c.dom.Element> |
getUnclassifieds() |
java.io.File |
getXsdFile()
Returns the file that has been used for initalisation, null if the profile has been created
from a string.
|
boolean |
hasInconsistentEnvelopeName()
Returns whether this profile follows the convention to have the envelope name same as the
profile name.
|
boolean |
hasInconsistentNamespace()
Returns whether this profile follows the convention to have the namespace end with the
profile name (followed by the URI fragment separator 35 ).
|
java.lang.String |
toString() |
public static final java.lang.String TARGET_NS_PREFIX
public static final char FRAGMENT_SEPARATOR
public static final java.lang.String XPATH_LOCAL_DOC
public static final java.lang.String XPATH_CLASSES_AND_COMPOUNDS
public static final java.lang.String XPATH_ATTR_AND_ASSOC_ENDS
public static final java.lang.String XPATH_CHOICE_ASSOC_ENDS
public static final java.lang.String XPATH_LITERALS
public Profile(Config cfg, java.io.File xsdFile)
TODO: ctor from XmlString
cfg
- xsdFile
- public static java.util.Map<java.lang.String,java.lang.String> getPrimitives()
public java.util.List<java.lang.String> getSubdirNames()
OwningWg
for this profile, the remaining names correspond to the names of
UmlPackage
-s to be created recursiverly.public java.lang.String getName()
getEnvelopeName()
.public java.lang.String getEnvelopeName()
public java.io.File getXsdFile()
public java.util.Map<java.lang.String,java.lang.String> getTargetNamespace()
public java.util.List<XmlNs> getNamespaces()
public java.util.Map<java.lang.String,java.lang.String> getCimNamespaces()
public java.util.Map<java.lang.String,java.util.List<org.w3c.dom.Element>> getClassesAndCompounds()
public java.util.Collection<java.lang.String> getCimPrimitives()
public java.util.Map<java.lang.String,java.util.List<org.tanjakostic.jcleancim.experimental.builder.xsd.ProfileEnumeration>> getEnums()
public java.util.Map<java.lang.String,java.util.List<org.tanjakostic.jcleancim.experimental.builder.xsd.ProfileDatatype>> getDatatypes()
public java.util.Map<java.lang.String,java.util.List<org.w3c.dom.Element>> getAttributesAndAssocEnds()
public java.util.Map<java.lang.String,java.util.List<org.w3c.dom.Element>> getLiterals()
public java.util.Set<org.w3c.dom.Element> getUnclassifieds()
public boolean hasInconsistentEnvelopeName()
public boolean hasInconsistentNamespace()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright 2009-2016 Tatjana (Tanja) Kostic