|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ceryle.tm.FacetImpl
public class FacetImpl
Implements Facet as a structure for containing
a Topic Map facet, including its type, value, default value, and
constraining facets. This class includes constructors, set/get and
utility methods for creating and manipulating facets.
Note that this class is dynamic, i.e., it generates its components:
the necessary Topics, Associations, Occurrences, etc. are created as
needed. Note that if the facet name is supplied, the created BaseName
is scoped by the faceted Topic to avoid unwanted merging.
Also see the notes found in the interface itself.
Facet| Field Summary | |
|---|---|
static String |
fsfx
The facet ID suffix (used to prefix auto-generated IDs). |
protected Topic |
m_facet
The facet Topic. |
protected Occurrence |
m_facetDefault
The Occurrence containing the facet default value. |
protected Topic |
m_faceted
The Topic being faceted. |
protected Occurrence |
m_facetMaxExcl
The Occurrence containing the facet maximum exclusive constraint value. |
protected Occurrence |
m_facetMaxIncl
The Occurrence containing the facet maximum inclusive constraint value. |
protected Occurrence |
m_facetMinExcl
The Occurrence containing the facet minimum exclusive constraint value. |
protected Occurrence |
m_facetMinIncl
The Occurrence containing the facet minimum inclusive constraint value. |
protected Topic |
m_facetType
The facet typing Topic. |
protected Occurrence |
m_facetValue
The Occurrence containing the facet value. |
protected Association |
m_hasFacet
The hasFacet Association. |
protected TopicMap |
m_tm
The TopicMap in which the facet occurs. |
| Constructor Summary | |
|---|---|
FacetImpl(Association hasFacet)
Constructor for a Facet provided with the hasFaceted Association. |
|
FacetImpl(Topic faceted)
Constructor for a Facet with the faceted Topic. |
|
FacetImpl(Topic faceted,
Topic facet)
Constructor for a Facet with the facet and faceted Topics. |
|
FacetImpl(Topic faceted,
Topic facet,
Topic facetType)
Constructor for a Facet with the facet, faceted, and facet type Topics. |
|
FacetImpl(Topic faceted,
Topic facet,
Topic facetType,
Object facetValue)
Constructor for a Facet with the facet, faceted, and facet type Topics, and the facet value. |
|
FacetImpl(Topic faceted,
Topic facet,
Topic facetType,
Object facetValue,
String facetName,
Object facetDefault,
Object facetMinIncl,
Object facetMaxIncl,
Object facetMinExcl,
Object facetMaxExcl)
Constructor for the "everything" bagel/facet. |
|
| Method Summary | |
|---|---|
Topic |
getFacet()
Return the facet Topic. |
Occurrence |
getFacetDefault()
Return the facet Default as a Topic Occurrence. |
Topic |
getFaceted()
Return the faceted Topic. |
Association |
getFacetLink()
Return the facet Association. |
Occurrence |
getFacetMaxExcl()
Return the facet maximum exclusive constraint as a Topic Occurrence. |
Occurrence |
getFacetMaxIncl()
Return the facet maximum inclusive constraint as a Topic Occurrence. |
Occurrence |
getFacetMinExcl()
Return the facet minimum exclusive constraint as a Topic Occurrence. |
Occurrence |
getFacetMinIncl()
Return the facet minimum inclusive constraint as a Topic Occurrence. |
BaseName |
getFacetName()
Return the facet Name as a String. |
Collection |
getFacetTypes(boolean includeMergedTopics)
Return the types of this Facet, and optionally, of all merged Topics. |
Occurrence |
getFacetValue()
Return the facet value as an Occurrence. |
protected void |
setFacet(Topic facet)
Set the facet Topic and generate the 'hasFacet' Association. |
void |
setFacetDefault(Object facetDefault)
Set the facet default value to the object facetDefault, which must be either a String or a Locator. |
protected void |
setFaceted(Topic faceted)
Set the faceted Topic. |
void |
setFacetMaxExcl(Object facetMaxExcl)
Set the facet maximum exclusive constraint to the Object facetMaxExcl, which must be either a String or a Locator. |
void |
setFacetMaxIncl(Object facetMaxIncl)
Set the facet maximum inclusive constraint to the Object facetMaxIncl, which must be either a String or a Locator. |
void |
setFacetMinExcl(Object facetMinExcl)
Set the facet minimum exclusive constraint to the Object facetMinExcl, which must be either a String or a Locator. |
void |
setFacetMinIncl(Object facetMinIncl)
Set the facet minimum inclusive constraint to the Object facetMinIncl, which must be either a String or a Locator. |
void |
setFacetName(String name)
Set the facet Name to the String name. |
void |
setFacetType(Topic facetType,
boolean replace)
Add the Topic facetType as a type of this Facet. |
void |
setFacetValue(Object facetValue)
Set the facet Value to the Object facetValue, which must be either a String or a Locator. |
String |
toString()
Return a String representation of this Facet. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static String fsfx
protected TopicMap m_tm
protected Topic m_facet
protected Topic m_faceted
protected Topic m_facetType
protected Association m_hasFacet
protected Occurrence m_facetValue
protected Occurrence m_facetDefault
protected Occurrence m_facetMinIncl
protected Occurrence m_facetMaxIncl
protected Occurrence m_facetMinExcl
protected Occurrence m_facetMaxExcl
| Constructor Detail |
|---|
public FacetImpl(Topic faceted)
throws TopicMapException
getFacet() and getFacetLink(), respectively.
faceted - the faceted Topic
TopicMapException - if the faceted Topic is null or an error occurs during construction
public FacetImpl(Topic faceted,
Topic facet)
throws TopicMapException
getFacetLink().
faceted - the faceted Topic (i.e., the Topic receiving the facet)facet - the facet Topic (i.e., the Topic acting as a facet)
TopicMapException - if the faceted Topic is null or an error occurs during construction
public FacetImpl(Topic faceted,
Topic facet,
Topic facetType)
throws TopicMapException
getFacetLink(). In order to differentiate the constructor
signature, if the faceted Topic and facet type Topic are provided, but
the facet Topic is null, the latter will be created (and is returned
via getFacet().
faceted - the faceted Topicfacet - the optional Topic used as a facetfacetType - the facet typing Topic
TopicMapException - if the faceted Topic is null or an error occurs during construction
public FacetImpl(Topic faceted,
Topic facet,
Topic facetType,
Object facetValue)
throws TopicMapException
getFacetLink().
The supplied Object for the facet value may be either a String (in XTM,
represented as a <resourceData> element) or a a Locator
(in XTM, represented as a <resourceRef>).
faceted - the faceted Topicfacet - the Topic used as a facetfacetType - the facet typing TopicfacetValue - the facet value, either a String or a Locator
TopicMapException - if the faceted Topic is null or an error occurs during construction
public FacetImpl(Topic faceted,
Topic facet,
Topic facetType,
Object facetValue,
String facetName,
Object facetDefault,
Object facetMinIncl,
Object facetMaxIncl,
Object facetMinExcl,
Object facetMaxExcl)
throws TopicMapException
faceted - the faceted Topic (i.e., the Topic being faceted)facet - the Topic used as a facetfacetType - the facet typing TopicfacetValue - the facet value, either a String or a LocatorfacetName - the facet name, as a StringfacetDefault - the facet default value, as a String or a LocatorfacetMinIncl - the facet minimum inclusive value, as a String or a LocatorfacetMaxIncl - the facet maximum inclusive value, as a String or a LocatorfacetMinExcl - the facet minimum exclusive value, as a String or a LocatorfacetMaxExcl - the facet maximum exclusive value, as a String or a Locator
TopicMapException - if the faceted Topic is null or an error occurs during construction
public FacetImpl(Association hasFacet)
throws TopicMapException
hasFacet - the faceting Association
TopicMapException - if the Facet cannot be reconstructed for any reason,
or the found structure is invalid.| Method Detail |
|---|
protected void setFaceted(Topic faceted)
throws TopicMapException
TopicMapExceptionpublic Topic getFaceted()
getFaceted in interface Facet
protected void setFacet(Topic facet)
throws TopicMapException
TopicMapExceptionpublic Topic getFacet()
getFacet in interface Facetpublic Association getFacetLink()
getFacetLink in interface Facet
public void setFacetType(Topic facetType,
boolean replace)
throws TopicMapException
setFacetType in interface FacetTopicMapExceptionpublic Collection getFacetTypes(boolean includeMergedTopics)
getFacetTypes in interface Facet
public void setFacetValue(Object facetValue)
throws TopicMapException
setFacetValue in interface FacetTopicMapExceptionpublic Occurrence getFacetValue()
getFacetValue in interface Facet
public void setFacetName(String name)
throws TopicMapException
setFacetName in interface FacetTopicMapExceptionpublic BaseName getFacetName()
getFacetName in interface Facet
public void setFacetDefault(Object facetDefault)
throws TopicMapException
setFacetDefault in interface FacetTopicMapExceptionpublic Occurrence getFacetDefault()
getFacetDefault in interface Facet
public void setFacetMinIncl(Object facetMinIncl)
throws TopicMapException
setFacetMinIncl in interface FacetTopicMapExceptionpublic Occurrence getFacetMinIncl()
getFacetMinIncl in interface Facet
public void setFacetMaxIncl(Object facetMaxIncl)
throws TopicMapException
setFacetMaxIncl in interface FacetTopicMapExceptionpublic Occurrence getFacetMaxIncl()
getFacetMaxIncl in interface Facet
public void setFacetMinExcl(Object facetMinExcl)
throws TopicMapException
setFacetMinExcl in interface FacetTopicMapExceptionpublic Occurrence getFacetMinExcl()
getFacetMinExcl in interface Facet
public void setFacetMaxExcl(Object facetMaxExcl)
throws TopicMapException
setFacetMaxExcl in interface FacetTopicMapExceptionpublic Occurrence getFacetMaxExcl()
getFacetMaxExcl in interface Facetpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||