Package de.itemis.tooling.xturtle.xturtle

Examples of de.itemis.tooling.xturtle.xturtle.Triples


 
  @Override
  protected URI findClosestExportedContainerURI(EObject element,
      Map<EObject, URI> exportedElementsMap) {
    if(element instanceof ResourceRef){
      Triples triples = EcoreUtil2.getContainerOfType(element, Triples.class);
      //the subject is not exactly the container of a reference, but it represents the triple
      return super.findClosestExportedContainerURI(triples.getSubject(), exportedElementsMap);
    }else{
      return super.findClosestExportedContainerURI(element, exportedElementsMap);
    }
  }
View Full Code Here


  public boolean createEObjectDescriptions(EObject eObject,
      IAcceptor<IEObjectDescription> acceptor) {
    if(eObject instanceof Resource){
      QualifiedName qualifiedName = getQualifiedNameProvider().getFullyQualifiedName(eObject);
      if(qualifiedName!=null){
        Triples triples=(Triples)eObject.eContainer();
        Map<String,String> userData=getUserData(triples);
        IEObjectDescription desc=new TurtleEObjectDescription(qualifiedName, eObject,userData);
        acceptor.accept(desc);
      }
      return false;
View Full Code Here

  //Technically, the subject of the triple is not a container of the reference,
  //however, the subject is exported and represents (the name) of the triple.
  //Using its URI in the reference description ensures that "find references" gives
  //a (more) meaningful label in the search result view
  private URI getExportedSubjectUri(EObject ref) {
    Triples triples = EcoreUtil2.getContainerOfType(ref, Triples.class);
    if(triples!=null){
      Subject subject = triples.getSubject();
      if(subject instanceof Resource){
        org.eclipse.emf.ecore.resource.Resource res = subject.eResource();
        return res.getURI().appendFragment(res.getURIFragment(subject));
      }
    }
View Full Code Here

TOP

Related Classes of de.itemis.tooling.xturtle.xturtle.Triples

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.