Package eu.planets_project.services.datatypes

Examples of eu.planets_project.services.datatypes.Agent


     * Returns the Agent of the batch processor the template is currently executed by.
     * @return the Agent
     */
    public Agent getWEEAgent(){
      if(this.agentWEE==null)
        this.agentWEE = new Agent("Planets-WEE-v1.0", "The Planets Workflow Execution Engine", "planets://workflow/processor");
      return this.agentWEE;
    }
View Full Code Here


          .type("digital object format")
          .build();
    pList.add(pIdentificationContent);
    Event eIdentifyFormat = new Event(
        IDENTIFY_EVENT, System.currentTimeMillis() + "", new Double(100),
        new Agent("JCR Repository v1.0", "The Planets Jackrabbit Content Repository", "planets://data/repository"),
        pList);
    return eIdentifyFormat;
  }
View Full Code Here

      Event res = null;
      try {
        Property _propSummary = node.getProperty(DOJCRConstants.DOJCR_EVENTS_SUMMARY);
        Property _propDatetime = node.getProperty(DOJCRConstants.DOJCR_EVENTS_DATETIME);
        Property _propDuration = node.getProperty(DOJCRConstants.DOJCR_EVENTS_DURATION);
        Agent agentObj = retrieveAgent(node);
          List<eu.planets_project.services.datatypes.Property> propertyResList =
            retrievePropertyList(node);
        res = new Event
              ( _propSummary.getString()
              , _propDatetime.getString()
View Full Code Here

     * @throws URISyntaxException
     */
    public Agent retrieveAgent(Node eventNode)
          throws ItemNotFoundException, RepositoryException, URISyntaxException
    {
      Agent res = null;
     
      try
      {
           Node agentNode = eventNode.getNode(DOJCRConstants.DOJCR_EVENTS_AGENT);
          
        Property _propId = agentNode.getProperty(DOJCRConstants.DOJCR_EVENTS_AGENT_ID);
        Property _propName = agentNode.getProperty(DOJCRConstants.DOJCR_EVENTS_AGENT_NAME);
        Property _propType = agentNode.getProperty(DOJCRConstants.DOJCR_EVENTS_AGENT_TYPE);
        res = new Agent(
               _propId.getString(),
             _propName.getString(),
             _propType.getString()
             );
        res.toString();
    } catch (Exception e)
    {
      _log.log(Level.INFO, "retrieveAgent() error: " + e.getMessage(), e);
    }
       
View Full Code Here

          .type("digital object migration")
          .build();
    pList.add(pIdentificationContent);
    Event eIdentifyFormat = new Event(
        eventType, System.currentTimeMillis() + "", new Double(100),
        new Agent("JCR Repository v1.0", "The Planets Jackrabbit Content Repository", "planets://data/repository"),
        pList);
    return eIdentifyFormat;
  }
View Full Code Here

     * Returns the Agent of the repository system.
     * @return
     */
    public Agent getAgent(){
      if(agent==null)
        agent = new Agent("JCR Repository v1.0", "The Planets Jackrabbit Content Repository", "planets://data/repository");
      return agent;
    }
View Full Code Here

          .type("digital object migration")
          .build();
    pList.add(pIdentificationContent);
    Event eIdentifyFormat = new Event(
        MIGRATE_EVENT, System.currentTimeMillis() + "", new Double(100),
        new Agent("JCR Repository v1.0", "The Planets Jackrabbit Content Repository", "planets://data/repository"),
        pList);
    return eIdentifyFormat;
  }
View Full Code Here

       * This method adds agent to the object view tree.
       * @param childNode The node containing added data
       * @param o The digital object
       */
      private static void describeAgent(TreeNode eventNode, Event eventObj) {
          Agent agentObj = eventObj.getAgent();  
          if (agentObj != null) {
              TreeNode agentNode = addNode(eventNode, ModelConfiguration.DigitalObjectModel.EventsList.Event.AGENT.name());
        try
        {
                  if (agentObj.getId() != null) {
                    addNode(agentNode,
                      ModelConfiguration.DigitalObjectModel.EventsList.Event.Agent.AgentObject.ID.name(), agentObj.getId());
                  }
                  if (agentObj.getName() != null) {
                    addNode(agentNode,
                      ModelConfiguration.DigitalObjectModel.EventsList.Event.Agent.AgentObject.NAME.name(), agentObj.getName());
                  }
                  if (agentObj.getType() != null) {
                    addNode(agentNode,
                      ModelConfiguration.DigitalObjectModel.EventsList.Event.Agent.AgentObject.TYPE.name(), agentObj.getType());
                  }
        } catch (Exception e)
        {
          log.log(Level.INFO, "agent error: " + e.getMessage(), e);
        }
View Full Code Here

       * This method adds linking agent to the object view tree.
       * @param childNode The node containing added data
       * @param o The digital object
       */
      private static void describeLinkingAgentId(TreeNode eventNode, Event eventObj) {
          Agent agentObj = eventObj.getAgent();  
          if (agentObj != null) {
              TreeNode agentNode = addNode(eventNode,
                  ModelConfiguration.PremisModel.LinkingEventIdentifier.EventIdentifier.LINKING_AGENT_IDENTIFIER.name());
        try
        {
                  TreeNode agentIdNode = addNode(agentNode,
                      ModelConfiguration.PremisModel.LinkingEventIdentifier.EventIdentifier.LinkingAgentIdentifier.AGENT_IDENTIFIER.name());
                  if (agentObj.getId() != null) {
                    addNode(agentIdNode, ModelConfiguration.PremisModel.LinkingEventIdentifier.EventIdentifier.LinkingAgentIdentifier.AgentIdentifier.TYPE.name(), "String");
                    addNode(agentIdNode, ModelConfiguration.PremisModel.LinkingEventIdentifier.EventIdentifier.LinkingAgentIdentifier.AgentIdentifier.VALUE.name(), agentObj.getId());
                  }
                  if (agentObj.getName() != null) {
                    addNode(agentNode,
                      ModelConfiguration.PremisModel.LinkingEventIdentifier.EventIdentifier.LinkingAgentIdentifier.AGENT_NAME.name(), agentObj.getName());
                  }
                  if (agentObj.getType() != null) {
                    addNode(agentNode,
                      ModelConfiguration.PremisModel.LinkingEventIdentifier.EventIdentifier.LinkingAgentIdentifier.AGENT_TYPE.name(), agentObj.getType());
                  }
        } catch (Exception e)
        {
          log.log(Level.INFO, "agent error: " + e.getMessage(), e);
        }
View Full Code Here

                  .type("digital object format")
                  .build();
            pList.add(pIdentificationContent);
            Event eIdentifyFormat = new Event(
                IDENTIFICATION_EVENT, System.currentTimeMillis() + "", new Double(DURATION),
                new Agent("http://testbed-dev.planets-project.ait.ac.at:80/pserv-pc-droid/Droid?wsdl"
                    , identify.NAME, identify.QNAME.toString()),
                pList);
          dgoB = addEvent(dgoB, eIdentifyFormat, URI.create(types[0]));
         
          List<Property> pMigrationList = new ArrayList<Property>();
          Property pMigrationContent = new Property.Builder(URI.create("Migrate"))
                .name("content by reference")
                .value(types[0].toString())
                .description("This is a migration event")
                .unit("URI")
                .type("digital object format")
                .build();
          pMigrationList.add(pMigrationContent);
            Event eMigration = new Event(
                MIGRATION_EVENT, System.currentTimeMillis() + "", new Double(DURATION),
                new Agent(migrationEndpoint, migrate.NAME, migrate.QNAME.toString()),
                pMigrationList);
          dgoB = addEvent(dgoB, eMigration, null);
         
               // add create SIP event
          List<Property> pSipList = new ArrayList<Property>();
          Property pSipContent = new Property.Builder(URI.create("CreateSIP"))
                .name("SIP message")
                .value(types[0].toString())
                .description("This is a SIP message creation")
                .unit("file")
                .type("ZIP format")
                .build();
          pSipList.add(pSipContent);
          Event eSip = new Event(
              SIP_CREATION_EVENT, System.currentTimeMillis() + "", new Double(DURATION),
              new Agent("ZIP file", "The SIP message creation", "ZIP"),
              pSipList);
          dgoB = addEvent(dgoB, eSip, null);         
             }
           }
          
View Full Code Here

TOP

Related Classes of eu.planets_project.services.datatypes.Agent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.