Package ora4mas.nopl
Class OrgArt
- java.lang.Object
-
- cartago.Artifact
-
- ora4mas.nopl.OrgArt
-
- All Implemented Interfaces:
ToXML
,npl.DynamicFactsProvider
- Direct Known Subclasses:
GroupBoard
,NormativeBoard
,SchemeBoard
public abstract class OrgArt extends cartago.Artifact implements ToXML, npl.DynamicFactsProvider
Common class for all organisational artifacts
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
OrgArt.Ora4masWSPRuleEngine
manages listener to be notified about agents that quit the system(package private) class
OrgArt.UpdateGuiThread
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<cartago.ArtifactId>
dfpListeners
protected GUIInterface
gui
private javax.xml.transform.Transformer
guiStyleSheet
protected java.util.logging.Logger
logger
protected npl.NormativeListener
myNPLListener
protected npl.NPLInterpreter
nengine
private javax.xml.transform.Transformer
nsTransformer
protected java.lang.String
oeId
protected java.lang.String
orgBoardName
protected CollectiveOE
orgState
protected java.lang.String
ownerAgent
private javax.xml.parsers.DocumentBuilder
parser
protected boolean
running
protected boolean
runningDestroy
static java.lang.String
sglDestroyed
static java.lang.String
sglNormFailure
static java.lang.String
sglOblCreated
static java.lang.String
sglOblFulfilled
static java.lang.String
sglOblInactive
static java.lang.String
sglOblUnfulfilled
protected OrgArt.UpdateGuiThread
updateGUIThread
private static OrgArt.Ora4masWSPRuleEngine
wspEng
-
Constructor Summary
Constructors Constructor Description OrgArt()
-
Method Summary
Modifier and Type Method Description void
agKilled(java.lang.String agName)
java.util.Iterator<jason.asSemantics.Unifier>
consult(jason.asSyntax.Literal l, jason.asSemantics.Unifier u)
protected void
debug(java.lang.String kind, java.lang.String title, boolean hasOE)
protected void
destroy()
protected static java.lang.String
fixAgName(java.lang.String ag)
static java.lang.String
fixOSFile(java.lang.String osFile)
java.lang.String
getArtId()
protected java.lang.String
getAsDot()
java.lang.String
getDebugText()
protected java.util.logging.Logger
getLogger()
npl.NPLInterpreter
getNormativeEngine()
(package private) static java.lang.Object
getNormIdTerm(npl.DeonticModality o)
java.lang.String
getNPLSrc()
javax.xml.transform.Transformer
getNSTransformer()
java.lang.String
getOEId()
java.lang.String
getOpUserName()
javax.xml.parsers.DocumentBuilder
getParser()
javax.xml.transform.Transformer
getStyleSheet()
protected abstract java.lang.String
getStyleSheetName()
(package private) static java.lang.Object[]
getTermsAsProlog(jason.asSyntax.Literal o)
(package private) static java.lang.Object[]
getTermsAsProlog(npl.DeonticModality o)
protected void
initNormativeEngine(OS os, java.lang.String type)
void
initWspRuleEngine()
protected void
installNormativeSignaler()
boolean
isRelevant(jason.asSyntax.PredicateIndicator pi)
protected boolean
isUserAllowed()
(package private) void
notifyListeners()
protected void
ora4masOperationTemplate(Operation op, java.lang.String errorMsg)
void
postReorgUpdates(OS os, java.lang.String nplId, java.lang.String ss)
void
setOrgBoardName(java.lang.String n)
void
setOwner(java.lang.String artOwner)
java.lang.String
specToStr(ToXML spec, javax.xml.transform.Transformer transformer)
(package private) void
subscribeDFP(cartago.ArtifactId subscriber)
protected void
updateGuiOE()
-
Methods inherited from class cartago.Artifact
await, await, await_time, beginExtSession, commit, defineNewOp, defineObsProperty, defineOp, delay, dispose, dispose, endExtSession, endExtSessionWithFailure, execInternalOp, execLinkedOp, execLinkedOp, failed, failed, getCreatorId, getCurrentOpAgentBody, getCurrentOpAgentId, getId, getLinkedArtifacts, getManualSrcFile, getObservabilityRadius, getObsProperty, getObsPropertyByTemplate, getOpKey, getPosition, hasObsProperty, hasObsPropertyByTemplate, isLinked, log, lookupArtifact, makeArtifact, removeObsProperty, removeObsPropertyByTemplate, removeOp, setupOperations, setupPosition, signal, signal, updateObservabilityRadius, updateObsProperty, updatePosition
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
sglOblCreated
public static final java.lang.String sglOblCreated
- See Also:
- Constant Field Values
-
sglOblFulfilled
public static final java.lang.String sglOblFulfilled
- See Also:
- Constant Field Values
-
sglOblUnfulfilled
public static final java.lang.String sglOblUnfulfilled
- See Also:
- Constant Field Values
-
sglOblInactive
public static final java.lang.String sglOblInactive
- See Also:
- Constant Field Values
-
sglNormFailure
public static final java.lang.String sglNormFailure
- See Also:
- Constant Field Values
-
sglDestroyed
public static final java.lang.String sglDestroyed
- See Also:
- Constant Field Values
-
nengine
protected npl.NPLInterpreter nengine
-
myNPLListener
protected npl.NormativeListener myNPLListener
-
orgState
protected CollectiveOE orgState
-
gui
protected GUIInterface gui
-
running
protected boolean running
-
updateGUIThread
protected OrgArt.UpdateGuiThread updateGUIThread
-
oeId
protected java.lang.String oeId
-
ownerAgent
protected java.lang.String ownerAgent
-
dfpListeners
protected java.util.List<cartago.ArtifactId> dfpListeners
-
orgBoardName
protected java.lang.String orgBoardName
-
logger
protected java.util.logging.Logger logger
-
runningDestroy
protected boolean runningDestroy
-
parser
private javax.xml.parsers.DocumentBuilder parser
-
guiStyleSheet
private javax.xml.transform.Transformer guiStyleSheet
-
nsTransformer
private javax.xml.transform.Transformer nsTransformer
-
wspEng
private static OrgArt.Ora4masWSPRuleEngine wspEng
-
-
Method Detail
-
getLogger
protected java.util.logging.Logger getLogger()
-
fixOSFile
public static java.lang.String fixOSFile(java.lang.String osFile)
-
getOEId
public java.lang.String getOEId()
-
getArtId
public java.lang.String getArtId()
-
initNormativeEngine
protected void initNormativeEngine(OS os, java.lang.String type) throws MoiseException, npl.parser.ParseException
- Throws:
MoiseException
npl.parser.ParseException
-
getNormativeEngine
public npl.NPLInterpreter getNormativeEngine()
-
setOwner
public void setOwner(java.lang.String artOwner)
-
setOrgBoardName
public void setOrgBoardName(java.lang.String n)
-
isUserAllowed
protected boolean isUserAllowed()
-
destroy
protected void destroy()
-
installNormativeSignaler
protected void installNormativeSignaler()
-
subscribeDFP
void subscribeDFP(cartago.ArtifactId subscriber) throws cartago.OperationException
- Throws:
cartago.OperationException
-
notifyListeners
void notifyListeners()
-
ora4masOperationTemplate
protected void ora4masOperationTemplate(Operation op, java.lang.String errorMsg)
-
postReorgUpdates
public void postReorgUpdates(OS os, java.lang.String nplId, java.lang.String ss) throws MoiseException, npl.parser.ParseException
- Throws:
MoiseException
npl.parser.ParseException
-
getTermsAsProlog
static java.lang.Object[] getTermsAsProlog(npl.DeonticModality o)
-
getNormIdTerm
static java.lang.Object getNormIdTerm(npl.DeonticModality o)
-
getTermsAsProlog
static java.lang.Object[] getTermsAsProlog(jason.asSyntax.Literal o)
-
getStyleSheetName
protected abstract java.lang.String getStyleSheetName()
-
getAsDot
protected java.lang.String getAsDot()
-
getParser
public javax.xml.parsers.DocumentBuilder getParser() throws javax.xml.parsers.ParserConfigurationException
- Throws:
javax.xml.parsers.ParserConfigurationException
-
specToStr
public java.lang.String specToStr(ToXML spec, javax.xml.transform.Transformer transformer) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getStyleSheet
public javax.xml.transform.Transformer getStyleSheet() throws javax.xml.transform.TransformerConfigurationException, java.io.IOException
- Throws:
javax.xml.transform.TransformerConfigurationException
java.io.IOException
-
getNSTransformer
public javax.xml.transform.Transformer getNSTransformer() throws javax.xml.transform.TransformerConfigurationException, javax.xml.transform.TransformerFactoryConfigurationError, java.io.IOException
- Throws:
javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerFactoryConfigurationError
java.io.IOException
-
updateGuiOE
protected void updateGuiOE()
-
initWspRuleEngine
public void initWspRuleEngine()
-
agKilled
public void agKilled(java.lang.String agName) throws java.lang.Exception
- Throws:
java.lang.Exception
-
debug
protected void debug(java.lang.String kind, java.lang.String title, boolean hasOE)
-
getDebugText
public java.lang.String getDebugText()
-
getNPLSrc
public java.lang.String getNPLSrc()
-
fixAgName
protected static java.lang.String fixAgName(java.lang.String ag)
-
getOpUserName
public java.lang.String getOpUserName()
- Overrides:
getOpUserName
in classcartago.Artifact
-
isRelevant
public boolean isRelevant(jason.asSyntax.PredicateIndicator pi)
- Specified by:
isRelevant
in interfacenpl.DynamicFactsProvider
-
consult
public java.util.Iterator<jason.asSemantics.Unifier> consult(jason.asSyntax.Literal l, jason.asSemantics.Unifier u)
- Specified by:
consult
in interfacenpl.DynamicFactsProvider
-
-