|
Project Aristotle - ArisID Attribute Services | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openliberty.arisid.SchemaManager
public class SchemaManager
SchemaManager is used to access and manipulate CarmlDoc
schema such
as Attributes, Predicates, Roles, and Policies.
Field Summary | |
---|---|
static java.lang.String |
schemaElement
|
Constructor Summary | |
---|---|
SchemaManager(ArisIdService svc,
java.util.Collection<AttributeDef> attrDefs,
java.util.Collection<PredicateDef> propDefs,
java.util.Collection<RoleDef> roleDefs,
java.util.Collection<IPolicy> policyDefs)
|
Method Summary | |
---|---|
void |
addExternalDataDef(java.net.URI carmlUri)
Method to allow an external CARML file data definitions to be added to the current schema. |
void |
addPolicy(IPolicy policy)
Adds a new WS-Policy object to the DataDefs. |
IPolicy |
addPolicyReference(java.net.URI policyUri)
Adds a new WS-PolicyReference object to the DataDefs. |
void |
appendNode(org.w3c.dom.Node parent)
|
AttributeDef |
createAttribute(java.lang.String nameId,
java.net.URI dataType,
java.lang.String friendlyName,
java.lang.String description,
java.lang.String cardinality)
Creates an AttributeDef object (that can be retrieved by
getAttribute(String) and returns the AttributeDefinition
created. |
PredicateDef |
createPredicate(java.lang.String nameId,
java.lang.String displayName,
java.lang.String description)
Creates an PredicateDef object (that can be retrieved by
getPredicate(String) and returns the PredicateDef created. |
RoleDef |
createRole(java.lang.String nameId,
java.lang.String displayName,
java.lang.String description)
Creates an RoleDef object (that can be retrieved by
getRole(String) and returns the RoleDef created. |
AttributeDef |
getAttribute(java.lang.String nameId)
|
java.util.Collection<AttributeDef> |
getAttributes()
|
java.util.Collection<IPolicy> |
getPolicies()
Returns an array of IPolicy objects representing the policies defined in the Carml/DataDef section. |
IPolicy |
getPolicy(java.lang.String nameId)
Returns a IPolicy (e.g. |
PredicateDef |
getPredicate(java.lang.String nameId)
|
java.util.Collection<PredicateDef> |
getPredicates()
|
RoleDef |
getRole(java.lang.String nameId)
|
java.util.Collection<RoleDef> |
getRoles()
|
boolean |
isLocal(java.lang.Object schemaObject)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String schemaElement
Constructor Detail |
---|
public SchemaManager(ArisIdService svc, java.util.Collection<AttributeDef> attrDefs, java.util.Collection<PredicateDef> propDefs, java.util.Collection<RoleDef> roleDefs, java.util.Collection<IPolicy> policyDefs) throws InitializedException
InitializedException
Method Detail |
---|
public void addExternalDataDef(java.net.URI carmlUri) throws java.io.FileNotFoundException, java.lang.InstantiationException, IGFException, java.lang.IllegalAccessException
carmlUri
- URI of a CARML document containing data definitions(schema) to
be added
java.io.FileNotFoundException
java.lang.InstantiationException
IGFException
java.lang.IllegalAccessException
public void addPolicy(IPolicy policy) throws InitializedException
Policy added using this method will appear in the Carml doc DataDefs/Polcies element.
policy
- A IPolicy object to be added.
InitializedException
public IPolicy addPolicyReference(java.net.URI policyUri) throws InitializedException
These policy declarations are used in conjunction with specific attributes, predicates, or roles used in an interaction.
Policy added using this method will appear in the Carml doc DataDefs/Polcies element.
policyUri
- A URI to a WS-Policy.
InitializedException
public IPolicy getPolicy(java.lang.String nameId)
nameId
- The policy URI name to be returned (IPolicy.getName()).
IPolicy
object contains the Apache Neethi Policy java
implementation of WS-Policy.public java.util.Collection<IPolicy> getPolicies()
public AttributeDef createAttribute(java.lang.String nameId, java.net.URI dataType, java.lang.String friendlyName, java.lang.String description, java.lang.String cardinality) throws InitializedException
AttributeDef
object (that can be retrieved by
getAttribute(String)
and returns the AttributeDefinition
created.
nameId
- The unique IdName for the attribute being createddataType
- A URI for the data type that describes the base data type,
formatting, etc of the attributefriendlyName
- A text name for the attribute that might be used for display
purposes. (see baseAttribute.getFriendlyName()
description
- A description of the attribute including any intended usage or
formatting details that might not be covered by the definition
asserted in the DataType URI.cardinality
- A type indicating the number of values the attribute has.
Valid values are AttributeDef.CARD_MULTI
,
AttributeDef.CARD_SINGLE
, and
AttributeDef.CARD_NONE
.
InitializedException
public AttributeDef getAttribute(java.lang.String nameId)
public java.util.Collection<AttributeDef> getAttributes()
public PredicateDef createPredicate(java.lang.String nameId, java.lang.String displayName, java.lang.String description) throws InitializedException
PredicateDef
object (that can be retrieved by
getPredicate(String)
and returns the PredicateDef created.
nameId
- The unique IdName for the predicate being createddisplayName
- A text name for the attribute that might be used for display
purposes. (see baseAttribute.getFriendlyName()
description
- A description of the attribute including any intended usage or
formatting details that might not be covered by the definition
asserted in the DataType URI.
InitializedException
public PredicateDef getPredicate(java.lang.String nameId)
public java.util.Collection<PredicateDef> getPredicates()
public RoleDef createRole(java.lang.String nameId, java.lang.String displayName, java.lang.String description) throws InitializedException
RoleDef
object (that can be retrieved by
getRole(String)
and returns the RoleDef created.
nameId
- The unique IdName for the role being createddisplayName
- A text name for the attribute that might be used for display
purposes. (see baseAttribute.getFriendlyName()
description
- A description of the attribute including any intended usage or
formatting details that might not be covered by the definition
asserted in the DataType URI.
InitializedException
public RoleDef getRole(java.lang.String nameId)
public java.util.Collection<RoleDef> getRoles()
public boolean isLocal(java.lang.Object schemaObject)
schemaObject
- AttributeDef, PredicateDef, RoleDef, IPolicy to be tested.
public void appendNode(org.w3c.dom.Node parent)
|
OpenLiberty.org - Licensed under Apache APL 2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |