Exemplo n.º 1
0
 /**
  * Removes all incoming and outgoing rnrm:isFlowingTo edges from the specified element. If this is
  * a fork, join, decision, or merge and it's not the start or end, then it will just be deleted
  * since you cannot recover it.
  *
  * @param procElement
  */
 public void isolateElement(Resource procElement) {
   removeOutgoingLinks(procElement);
   removeIncomingLinks(procElement);
   // if this is something other than an ActivityElement and isn't the
   // start or end, then remove it from the model
   if (!RDFHelper.hasRdfType(process.getModel(), procElement, RNRM.ActivityElement)
       && !procElement.equals(process.getStartElement())
       && !procElement.equals(process.getEndElement())) {
     removeFromProcess(procElement);
   }
 }
  private void createProblemModel(Node resource, Node classOrProperty, Resource type) {
    Model m = ModelFactory.createDefaultModel();

    Resource subject = m.createResource(resource.toString());
    m.add(new StatementImpl(subject, QPRO.exceptionDescription, type));

    if (type.equals(DQM.MisplacedClass))
      m.add(new StatementImpl(subject, DQM.hasMisplacedClass, m.asRDFNode(classOrProperty)));
    else m.add(new StatementImpl(subject, DQM.hasMisplacedProperty, m.asRDFNode(classOrProperty)));

    this.problemList.add(m);
  }
Exemplo n.º 3
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   EntitySummarization other = (EntitySummarization) obj;
   if (entity == null) {
     if (other.entity != null) return false;
   } else if (!entity.equals(other.entity)) return false;
   if (triples == null) {
     if (other.triples != null) return false;
   } else if (!triples.equals(other.triples)) return false;
   return true;
 }