public class SMSServices extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
COMPATIBLE |
static int |
INCOMPATIBLE |
static int |
UNKNOWN |
Constructor and Description |
---|
SMSServices() |
Modifier and Type | Method and Description |
---|---|
static void |
addListener(SMSTagChangeListener listener) |
static int |
compare(java.util.Vector semSubtypes,
java.util.Vector semSupertypes)
Compare the compatibility of the two sets of semantic types.
|
static boolean |
compatible(java.util.Vector semSubtypes,
java.util.Vector semSupertypes) |
static java.lang.String |
exportSemanticAnnotation(Entity entity) |
static java.util.Vector<SemanticType> |
getActorSemanticTypes(NamedObj obj) |
static java.util.Vector<java.lang.Object> |
getAllInputPorts(NamedObj obj) |
static java.util.Vector<SemanticType> |
getAllInputSemanticTypes(NamedObj obj)
Return all the input semantic types for the object.
|
static java.util.Vector<java.lang.Object> |
getAllOutputPorts(NamedObj obj) |
static java.util.Vector<SemanticType> |
getAllOutputSemanticTypes(NamedObj obj)
Return all the input semantic types for the object.
|
static java.util.Vector<java.lang.Object> |
getAllPorts(NamedObj obj)
Get all the ports, both "real" and "virtual" from a given named object.
|
static java.util.Vector<java.lang.Object> |
getIOPorts(NamedObj obj)
Get all the io ports
|
static NamedOntClass |
getNamedOntClassFor(SemanticType semtype) |
static NamedOntClass |
getNamedOntClassFor(java.lang.String conceptId) |
static java.util.Vector<java.lang.Object> |
getPortBundles(NamedObj obj)
Get all the port bundles define for a given named object.
|
static java.util.Vector<SemanticType> |
getPortSemanticTypes(java.lang.Object port)
Given a port object (TODO: convert to IOPortWrapper), returns the
semantic types assigned to the port.
|
static java.util.Vector<java.lang.Object> |
getRefinementPorts(NamedObj obj)
Get all the existing refinement ports defiend for a given named object.
|
static void |
importSemanticAnnotation(java.lang.String annotation,
Entity entity) |
static void |
removeListener(SMSTagChangeListener listener) |
static void |
setActorSemanticTypes(NamedObj obj,
java.util.Vector<NamedOntClass> namedOntClasses)
Set given NamedObj's SemanticTypes to namedOntClasses
|
public static int COMPATIBLE
public static int UNKNOWN
public static int INCOMPATIBLE
public SMSServices()
public static void addListener(SMSTagChangeListener listener)
public static void removeListener(SMSTagChangeListener listener)
public static int compare(java.util.Vector semSubtypes, java.util.Vector semSupertypes)
semSubtypes
- The semantic types that when conjoined form a sub-class of the
super type (semSupertypes).semSupertypes
- The semantic types that when conjoined form a super-class of
the sub type (subSemTypes)COMPATIBLE
if the inputs are compatible,
UNKNOWN
if the inputs are unkown, and
INCOMPATIBLE
if the types are incompatible.
FIXME: Need to somehow handle the case when the semtype is not
available locally: Can we assume they are known here? Do we need
to call the object manager? Do we throw an exception? For now, we
just ignore them!public static boolean compatible(java.util.Vector semSubtypes, java.util.Vector semSupertypes)
public static NamedOntClass getNamedOntClassFor(SemanticType semtype)
public static NamedOntClass getNamedOntClassFor(java.lang.String conceptId)
public static java.util.Vector<SemanticType> getActorSemanticTypes(NamedObj obj)
public static void setActorSemanticTypes(NamedObj obj, java.util.Vector<NamedOntClass> namedOntClasses)
obj
- The named object (actor) to set the types onnamedOntClasses
- Set named object's SemanticTypes to thesepublic static java.util.Vector<java.lang.Object> getAllPorts(NamedObj obj)
obj
- the named objectpublic static java.util.Vector<java.lang.Object> getAllOutputPorts(NamedObj obj)
public static java.util.Vector<java.lang.Object> getAllInputPorts(NamedObj obj)
public static java.util.Vector<java.lang.Object> getIOPorts(NamedObj obj)
obj
- the named objectpublic static java.util.Vector<java.lang.Object> getRefinementPorts(NamedObj obj)
obj
- the named objectpublic static java.util.Vector<java.lang.Object> getPortBundles(NamedObj obj)
obj
- the named objectpublic static java.util.Vector<SemanticType> getPortSemanticTypes(java.lang.Object port)
port
- the port objectpublic static java.util.Vector<SemanticType> getAllOutputSemanticTypes(NamedObj obj)
public static java.util.Vector<SemanticType> getAllInputSemanticTypes(NamedObj obj)
public static java.lang.String exportSemanticAnnotation(Entity entity)
public static void importSemanticAnnotation(java.lang.String annotation, Entity entity)