|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.apelon.modules.dts.editor.tql.beans.QualifiedObject
public class QualifiedObject
Wrapper class for a general DTS object. Contains methods for converting between namespace-qualified names and DTS objects. Desired object types can specified by providing type codes. Type codes are bit-valued so they can be combined:
CONCEPT_ASSOCIATION | ROLE
Copyright (c) 2013 Apelon, Inc. All rights reserved.
| Nested Class Summary | |
|---|---|
static class |
QualifiedObject.AttributeType
|
| Field Summary | |
|---|---|
static int |
ALL
|
static int |
ASSOCIATION
|
static int |
AUTHORITY_PROPERTY
|
static int |
AUTHORITY_PROPERTY_QUALIFIER
|
static int |
BASE_ATTRIBUTE
|
static int |
CONCEPT
|
static int |
CONCEPT_ASSOCIATION
|
static int |
CONCEPT_ASSOCIATION_QUALIFIER
|
static int |
CONCEPT_PROPERTY
|
static int |
CONCEPT_PROPERTY_QUALIFIER
|
static java.lang.String |
DEFINING_PREFIX
|
static java.lang.String |
INVERSE_PREFIX
|
static int |
NAMESPACE_PROPERTY
|
static int |
NAMESPACE_PROPERTY_QUALIFIER
|
static int |
NAMESPACE_VERSION_PROPERTY
|
static int |
NAMESPACE_VERSION_PROPERTY_QUALIFIER
|
static int |
PROPERTY
|
static int |
QUALIFIER
|
static int |
ROLE
|
static int |
SUBSET_PROPERTY
|
static int |
SUBSET_PROPERTY_QUALIFIER
|
static int |
SUBSET_VERSION_PROPERTY
|
static int |
SUBSET_VERSION_PROPERTY_QUALIFIER
|
static int |
SYNONYM_ASSOCIATION
|
static int |
TERM
|
static int |
TERM_ASSOCIATION
|
static int |
TERM_ASSOCIATION_QUALIFIER
|
static int |
TERM_PROPERTY
|
static int |
TERM_PROPERTY_QUALIFIER
|
| Constructor Summary | |
|---|---|
QualifiedObject(DTSObject obj)
Create a QualifiedObject instance from a DTSObject. |
|
QualifiedObject(DTSObject obj,
boolean inv)
Create a QualifiedObject instance from an inverse of a DTSObject. |
|
QualifiedObject(java.lang.String name,
int type)
Create a QualifiedObject instance from a namespace-qualified name and attribute type code(s). |
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object o)
Implements Comparable for this class. |
boolean |
equals(java.lang.Object o)
Return whether the object argument represents the same QualifiedObject as this object. |
static int |
getCodeForTypeName(java.lang.String name)
Return the QualifiedObject type code for a
QualifiedObject.AttributeType type name. |
java.lang.String |
getName()
Return the fully-qualified name of this object. |
static java.lang.String |
getNameForObject(DTSObjectRef obj)
Return the fully-qualified name for a DTSObjectRef. |
DTSObject |
getObject()
Return the DTSObject represented by this object. |
static DTSObject |
getObjectForName(java.lang.String objname,
ConceptAttributeSetDescriptor casd)
Return the DTSConcept represented by a namespace-qualified object name. |
static DTSObject |
getObjectForName(java.lang.String objname,
ConceptAttributeSetDescriptor casd,
TermAttributeSetDescriptor tasd)
Return the DTSConcept or Term represented by a namespace-qualified object name. |
static DTSObject |
getObjectForName(java.lang.String objname,
int types)
Return the DTSObject represented by a namespace-qualified object name. |
static DTSObject |
getObjectForName(java.lang.String objname,
TermAttributeSetDescriptor tasd)
Return the Term represented by a namespace-qualified object name. |
int |
hashCode()
Return a hashcode on the fully-qualified name for this object. |
boolean |
isDefining()
Return whether this object is a defining object. |
boolean |
isInverse()
Return whether this object is an inverse object. |
void |
setDefining(boolean b)
Set the value of the defining aspect of this object. |
void |
setInverse(boolean b)
Set the value of the inverse aspect of this object. |
java.lang.String |
toString()
Return a string representation of this QualifiedObject. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String INVERSE_PREFIX
public static final java.lang.String DEFINING_PREFIX
public static final int CONCEPT
public static final int TERM
public static final int CONCEPT_PROPERTY
public static final int TERM_PROPERTY
public static final int NAMESPACE_PROPERTY
public static final int NAMESPACE_VERSION_PROPERTY
public static final int SUBSET_PROPERTY
public static final int SUBSET_VERSION_PROPERTY
public static final int AUTHORITY_PROPERTY
public static final int CONCEPT_ASSOCIATION
public static final int TERM_ASSOCIATION
public static final int SYNONYM_ASSOCIATION
public static final int ROLE
public static final int CONCEPT_PROPERTY_QUALIFIER
public static final int CONCEPT_ASSOCIATION_QUALIFIER
public static final int TERM_PROPERTY_QUALIFIER
public static final int TERM_ASSOCIATION_QUALIFIER
public static final int NAMESPACE_PROPERTY_QUALIFIER
public static final int NAMESPACE_VERSION_PROPERTY_QUALIFIER
public static final int SUBSET_PROPERTY_QUALIFIER
public static final int SUBSET_VERSION_PROPERTY_QUALIFIER
public static final int AUTHORITY_PROPERTY_QUALIFIER
public static final int ALL
public static final int PROPERTY
public static final int ASSOCIATION
public static final int QUALIFIER
public static final int BASE_ATTRIBUTE
| Constructor Detail |
|---|
public QualifiedObject(DTSObject obj)
QualifiedObject instance from a DTSObject.
obj - base DTSObject
public QualifiedObject(DTSObject obj,
boolean inv)
QualifiedObject instance from an inverse of a DTSObject.
obj - base DTSObjectinv - whether the QualifiedObject should be the inverse of the object
public QualifiedObject(java.lang.String name,
int type)
QualifiedObject instance from a namespace-qualified name and attribute type code(s).
name - the namespace-qualified object name (can begin with INVERSE_PREFIX
or DEFINING_PREFIX)type - the type code for the DTSObject. Can be bit-coded.| Method Detail |
|---|
public DTSObject getObject()
DTSObject represented by this object.
DTSObjectpublic java.lang.String getName()
public void setInverse(boolean b)
b - whether the object should be an inversepublic boolean isInverse()
public void setDefining(boolean b)
b - whether the object should be definingpublic boolean isDefining()
public java.lang.String toString()
QualifiedObject.
Returns the fully-qualified name.
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
QualifiedObject as this object.
Performs a comparison on fully-qualified name.
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int compareTo(java.lang.Object o)
Comparable for this class.
Performs a namespace-first comparison on the fully-qualified name.
compareTo in interface java.lang.Comparablepublic static java.lang.String getNameForObject(DTSObjectRef obj)
DTSObjectRef.
obj - a DTSObjectRef
public static DTSObject getObjectForName(java.lang.String objname,
int types)
DTSObject represented by a namespace-qualified object name.
The object must be of a type(s) given in the argument.
objname - the name of the objecttypes - the allowed type code(s) for the object
public static DTSObject getObjectForName(java.lang.String objname,
ConceptAttributeSetDescriptor casd)
DTSConcept represented by a namespace-qualified object name.
The DTSConcept will be populated with the attributes given in the ConceptAttributeSetDescriptor.
objname - the name of the DTSConceptcasd - the ConceptAttributeSetDescriptor to be used
DTSConcept
public static DTSObject getObjectForName(java.lang.String objname,
TermAttributeSetDescriptor tasd)
Term represented by a namespace-qualified object name.
The Term will be populated with the attributes given in the TermAttributeSetDescriptor.
objname - the name of the Termtasd - the TermAttributeSetDescriptor to be used
Term
public static DTSObject getObjectForName(java.lang.String objname,
ConceptAttributeSetDescriptor casd,
TermAttributeSetDescriptor tasd)
DTSConcept or Term represented by a namespace-qualified object name.
The return object will be populated with the attributes given in the ConceptAttributeSetDescriptor
or TermAttributeSetDescriptor as appropriate.
objname - the name of the DTSConcept or Termcasd - the ConceptAttributeSetDescriptor to be usedtasd - the TermAttributeSetDescriptor to be used
DTSConcept or Termpublic static int getCodeForTypeName(java.lang.String name)
QualifiedObject type code for a
QualifiedObject.AttributeType type name.
name - the name of the attribute
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||