|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.apelon.dts.client.namespace.Namespace
public class Namespace
Defines a Namespace. A Namespace defines a collection of concepts/terms in an Apelon knowledgebase.
To set the relative id, use setRelativeId(int)
after constructing the namespace.
Copyright: Copyright (c) 2003
Company: Apelon, Inc.
Field Summary | |
---|---|
static int |
LOCAL_NAMESPACE_ID_THRESHOLD
Minimum local namespace ID. |
static int |
MAXIMUM_NAMESPACE_ID
Maximum namespace ID ( = 65535 ). |
Constructor Summary | |
---|---|
Namespace(String name,
int id,
String code,
Authority authority,
NamespaceType namespaceType,
boolean writable,
boolean isLocal)
Namespace constructor. |
|
Namespace(String name,
int id,
String code,
Authority authority,
NamespaceType namespaceType,
int linkedNamespaceId,
boolean writable,
boolean local)
Namespace constructor for namespaces of type Ontylog Extension. |
Method Summary | |
---|---|
Object |
clone()
Clone this Namespace object. |
boolean |
equals(Object o)
Tests if two Namespace s are equal. |
Authority |
getAuthority()
Gets Authority for the namespace. |
String |
getCode()
Gets the code of the Namespace . |
ContentVersion |
getContentVersion()
Returns the latest ContentVersion for this namespace. |
int |
getId()
Gets the ID of the Namespace . |
int |
getLinkedNamespaceId()
Returns the Linked Namespace ID. |
String |
getName()
Gets the name of the Namespace . |
NamespaceType |
getNamespaceType()
Gets type of namespace. |
int |
getRelativeId()
Gets the namespace ID relative to a base of 0 for subscription namespaces, or to LOCAL_NAMESPACE_ID_THRESHOLD for a local namespace. |
int |
hashCode()
Returns a hash code for this Namespace . |
boolean |
isLocal()
Indicates whether the namespace is local or externally defined. |
boolean |
isWritable()
Indicates whether it's permissible to write to this namespace. |
void |
setAuthority(Authority newAuthority)
Sets the Authority for the Namespace. |
void |
setCode(String code)
Sets the code of the Namespace . |
void |
setContentVersion(ContentVersion contentVersion)
Sets the latest ContentVersion for this namespace. |
void |
setId(int id)
Sets the ID of the Namespace . |
void |
setName(String name)
Sets the name of the Namespace . |
void |
setNamespaceType(NamespaceType namespaceType)
Deprecated. -- namespaceType can only be set in constructor since version 3.3 |
void |
setRelativeId(int newId)
Set namespace ID according to the convention that the ID for a local namespace must be at least LOCAL_NAMESPACE_ID_THRESHOLD . |
void |
setWritable(boolean writable)
Indicate whether it's permissible to write to this namespace. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static int LOCAL_NAMESPACE_ID_THRESHOLD
public static int MAXIMUM_NAMESPACE_ID
Constructor Detail |
---|
public Namespace(String name, int id, String code, Authority authority, NamespaceType namespaceType, boolean writable, boolean isLocal)
To set the relative id, use setRelativeId(int)
after constructing the namespace.
name
- name of the namespaceid
- namespace IDcode
- namespace codeauthority
- identified Authority for the namespacenamespaceType
- NamespaceType of namespace (Ontylog, Thesaurus,
Connection, or Ontylog Extension)writable
- namespace writable indicatorisLocal
- indicator whether namespace is a local,
non-subscription namespacepublic Namespace(String name, int id, String code, Authority authority, NamespaceType namespaceType, int linkedNamespaceId, boolean writable, boolean local)
To set the relative id, use setRelativeId(int)
after constructing the namespace.
name
- name of the namespaceid
- namespace IDcode
- namespace codeauthority
- identified Authority for the namespacenamespaceType
- NamespaceType of namespace (Ontylog, Thesaurus,
Connection, or Ontylog Extension)linkedNamespaceId
- for use with NamespaceType Ontylog Extension onlywritable
- namespace writable indicatorlocal
- indicator whether namespace is a local,
non-subscription namespaceMethod Detail |
---|
public Object clone() throws CloneNotSupportedException
Namespace
object.
clone
in class Object
CloneNotSupportedException
- if unable to create a clonepublic String getName()
Namespace
.
Namespace
.public void setName(String name)
Namespace
.
name
- the new name of the Namespace
.public int getId()
Namespace
.
Namespace
.public void setId(int id)
Namespace
.
id
- the new ID of the Namespace
.public String getCode()
Namespace
.
Namespace
.public void setCode(String code)
Namespace
.
code
- the new code of the Namespace
.public void setRelativeId(int newId)
LOCAL_NAMESPACE_ID_THRESHOLD
. If a
namespace ID less than LOCAL_NAMESPACE_ID_THRESHOLD
is passed
for a local namespace, the ID will be incremented by
LOCAL_NAMESPACE_ID_THRESHOLD
.
newId
- the new namespace IDpublic int getRelativeId()
public void setAuthority(Authority newAuthority)
newAuthority
- the new Authority for the Namespacepublic Authority getAuthority()
public void setNamespaceType(NamespaceType namespaceType)
NamespaceType
class.
namespaceType
- namespace typepublic NamespaceType getNamespaceType()
public int getLinkedNamespaceId()
public void setWritable(boolean writable)
writable
- true
if the namespace is to be
writable; false
if not.public boolean isWritable()
true
if the namespace is writable;
false
if not.public boolean isLocal()
true
if the namespace is local; false
otherwisepublic ContentVersion getContentVersion()
ContentVersion
for this namespace.
For subscription namespaces this is the latest version in the knowledgebase.
A local namespace will have version only if it has been previously published.
ContentVersion
.public void setContentVersion(ContentVersion contentVersion)
ContentVersion
for this namespace.
This field is usually set by the server when this object is built.
contentVersion
- The latest ContentVersion
.public boolean equals(Object o)
Namespace
s are equal. Two Namespace are equal if
the following are true:
equals
in class Object
o
- object to compare with
true
if the two namespaces are equal;
false
otherwisepublic int hashCode()
Namespace
.
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |