public final class RdfsClass extends RdfsElem
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.lang.String> |
_attrInitValues |
private java.util.List<RdfsEnumLiteral> |
_enumLiterals |
private boolean |
_isCompound |
private boolean |
_isDatatype |
private boolean |
_isEnum |
private boolean |
_isPrimitive |
private boolean |
_isSubclass |
private static org.apache.log4j.Logger |
_logger |
private java.util.Map<java.lang.String,RdfsClass> |
_subclasses |
private java.util.List<java.lang.String> |
_superclassNames |
invalidCharsPattern
Constructor and Description |
---|
RdfsClass(RdfsModel model,
org.w3c.dom.Element elem)
Creates instance from DOM Element.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addEnumLiteral(RdfsEnumLiteral el) |
private RdfsDifference |
createNameSetDiff(java.lang.String field,
java.util.Set<java.lang.String> thisNames,
java.util.Set<java.lang.String> otherNames) |
private boolean |
determineWhetherSubclass() |
private boolean |
doEquals(boolean isForEquals,
java.lang.Object obj,
java.util.List<RdfsDifference> diffs) |
boolean |
equals(java.lang.Object obj)
Uses all instance fields except for _model.
|
java.lang.String |
getAttrInitValue(java.lang.String attrName)
Returns cached initial value for the attribute (deduced by reflection).
|
java.util.List<RdfsDifference> |
getDiffs(RdfsElem other)
Calculates differences between this instance and
other and returns them in a
list of Strings. |
private java.util.List<java.lang.String> |
getEnumLiteralNames() |
java.util.List<RdfsEnumLiteral> |
getEnumLiterals() |
java.lang.String |
getKind()
Here the kinds of classes:
|
java.util.Map<java.lang.String,RdfsClass> |
getSubclasses() |
int |
hashCode()
Uses all instance fields except for _model.
|
boolean |
isCompoundClass() |
boolean |
isDatatypeClass() |
boolean |
isEnumClass() |
boolean |
isPrimitiveClass() |
boolean |
isSubclass() |
(package private) boolean |
isValidForAssociation()
Returns whether this class is valid to be used as association domain or range.
|
(package private) boolean |
isValidForAttribute()
Returns whether this class is valid to be used as attribute dataType or range.
|
(package private) void |
linkWithSuperclass() |
(package private) void |
setIsDatatypeClass(boolean val)
RDF only
|
java.lang.String |
toString() |
java.lang.String |
toStringLong() |
formatDiff, formatMissingAndAdded, getAbout, getComment, getLabel, getModel, getName, getPackage, getSchemaLabel
private static final org.apache.log4j.Logger _logger
private final java.util.List<java.lang.String> _superclassNames
private final boolean _isSubclass
private final java.util.Map<java.lang.String,RdfsClass> _subclasses
private final java.util.List<RdfsEnumLiteral> _enumLiterals
private final boolean _isPrimitive
private boolean _isDatatype
private final boolean _isEnum
private final boolean _isCompound
private final java.util.Map<java.lang.String,java.lang.String> _attrInitValues
RdfsClass(RdfsModel model, org.w3c.dom.Element elem) throws CimSchemaException
model
- elem
- CimSchemaException
- if about attribute contains an invalid URI.private boolean determineWhetherSubclass()
void linkWithSuperclass()
public boolean isSubclass()
public java.util.Map<java.lang.String,RdfsClass> getSubclasses()
public java.util.List<RdfsEnumLiteral> getEnumLiterals()
public boolean isPrimitiveClass()
public boolean isDatatypeClass()
public boolean isEnumClass()
public boolean isCompoundClass()
void addEnumLiteral(RdfsEnumLiteral el)
void setIsDatatypeClass(boolean val)
val
- boolean isValidForAssociation()
boolean isValidForAttribute()
public java.lang.String getKind()
First level classes: non-sub (root) Enum, Datatype, Compound, Primitive (leaf) Other (leaf) Sub-class: sub Deepest sub-class: sub (leaf)
public java.lang.String getAttrInitValue(java.lang.String attrName)
attrName
- public java.lang.String toStringLong()
toStringLong
in class RdfsElem
private java.util.List<java.lang.String> getEnumLiteralNames()
public int hashCode()
RdfsElem
public boolean equals(java.lang.Object obj)
RdfsElem
private boolean doEquals(boolean isForEquals, java.lang.Object obj, java.util.List<RdfsDifference> diffs)
private RdfsDifference createNameSetDiff(java.lang.String field, java.util.Set<java.lang.String> thisNames, java.util.Set<java.lang.String> otherNames)
public final java.util.List<RdfsDifference> getDiffs(RdfsElem other)
RdfsElem
other
and returns them in a
list of Strings. While RdfsElem.equals(Object)
method ignores some known differences between
elements in different dialects, this method catches them all.
Implementation note: Subclasses that override this method are expected to first call super.runDiff().
Copyright 2009-2015 Tatjana (Tanja) Kostic