Package ora4mas.nopl

Class 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  
      • Nested classes/interfaces inherited from class cartago.Artifact

        cartago.Artifact.AbstractAsyncProcess
    • 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
      • Methods inherited from interface npl.DynamicFactsProvider

        consultFromCollection, consultFromProviders
    • Field Detail

      • sglOblUnfulfilled

        public static final java.lang.String sglOblUnfulfilled
        See Also:
        Constant Field Values
      • nengine

        protected npl.NPLInterpreter nengine
      • myNPLListener

        protected npl.NormativeListener myNPLListener
      • running

        protected boolean running
      • 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
    • Constructor Detail

      • OrgArt

        public OrgArt()
    • 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 class cartago.Artifact
      • isRelevant

        public boolean isRelevant​(jason.asSyntax.PredicateIndicator pi)
        Specified by:
        isRelevant in interface npl.DynamicFactsProvider
      • consult

        public java.util.Iterator<jason.asSemantics.Unifier> consult​(jason.asSyntax.Literal l,
                                                                     jason.asSemantics.Unifier u)
        Specified by:
        consult in interface npl.DynamicFactsProvider