Examples of Prefix


Examples of edu.isi.karma.kr2rml.Prefix

    }
    KR2RMLMapping kr2rmlMapping = new KR2RMLMapping(id, version);
    Map<String, String> prefixes = model.getNsPrefixMap();
    for(Entry<String, String> prefix : prefixes.entrySet())
    {
      Prefix p = new Prefix(prefix.getKey(), prefix.getValue());
      kr2rmlMapping.addPrefix(p);
    }
   
    SourceTypes sourceType = getSourceType(mappingResource);
    kr2rmlMapping.setColumnNameFormatter(KR2RMLColumnNameFormatterFactory.getFormatter(sourceType));
View Full Code Here

Examples of jnipap.Prefix

   * @param id Prefix ID to search for
   * @return Prefix with id 'id'
   */
  public static OPrefix getPrefix(OConnection conn, int id) throws JnipapException {

    Prefix p = Prefix.get((jnipap.Connection)conn, new Integer(id));
    return toSQLObj(p);

  }
View Full Code Here

Examples of jnipap.Prefix

   * Test adding and getting a prefix
   */
  @Test
  public void addGetPrefix() {

    Prefix prefix1, prefix2;

    prefix1 = new Prefix();
    prefix1.prefix = "192.168.0.0/16";
    prefix1.type = "reservation";
    prefix1.description = "RFC1918 class B block";

    try {
      prefix1.save(this.connection);
      prefix2 = Prefix.get(this.connection, prefix1.id);
    } catch (JnipapException e) {
      fail("Operation resulted in " + e.getClass().getName() + " with message \"" + e.getMessage() + "\"");
      return;
    }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteFormatter.Prefix

      return doVisitUnchangedChildren(node);
    }
    try {
      int pos= getScanner().getNextEndOffset(node.getStartPosition(), true); // pos after question mark
     
      Prefix prefix;
      if (Boolean.TRUE.equals(getNewValue(node, WildcardType.UPPER_BOUND_PROPERTY))) {
        prefix= this.formatter.WILDCARD_EXTENDS;
      } else {
        prefix= this.formatter.WILDCARD_SUPER;
      }
     
      int boundKindChange= getChangeKind(node, WildcardType.UPPER_BOUND_PROPERTY);
      if (boundKindChange != RewriteEvent.UNCHANGED) {
        int boundTypeChange= getChangeKind(node, WildcardType.BOUND_PROPERTY);
        if (boundTypeChange != RewriteEvent.INSERTED && boundTypeChange != RewriteEvent.REMOVED) {
          ASTNode type= (ASTNode) getOriginalValue(node, WildcardType.BOUND_PROPERTY);
          String str= prefix.getPrefix(0);
          doTextReplace(pos, type.getStartPosition() - pos, str, getEditGroup(node, WildcardType.BOUND_PROPERTY));
        }
      }
      rewriteNode(node, WildcardType.BOUND_PROPERTY, pos, prefix);
    } catch (CoreException e) {
View Full Code Here

Examples of org.bitbucket.rehei.sparqljava.model.Prefix

    return compose(IPrefixSelect.class);
  }

  @Override
  public IPrefixSelect prefix(String prefix, String iri) {
    list.add(new Prefix(prefix, iri));
    return compose(IPrefixSelect.class);
  }
View Full Code Here

Examples of org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteFormatter.Prefix

      } catch (CoreException e) {
        handleException(e);
      }
    }

    Prefix formatterPrefix;
    if (property == SingleVariableDeclaration.MODIFIERS2_PROPERTY)
      formatterPrefix= this.formatter.PARAM_ANNOTATION_SEPARATION;
    else
      formatterPrefix= this.formatter.ANNOTATION_SEPARATION;

    int endPos= new ModifierRewriter(formatterPrefix).rewriteList(node, property, pos, Util.EMPTY_STRING, " "); //$NON-NLS-1$

    try {
      int nextPos= getScanner().getNextStartOffset(endPos, false);

      boolean lastUnchanged= children[children.length - 1].getChangeKind() != RewriteEvent.UNCHANGED;

      if (isAllRemove) {
        doTextRemove(endPos, nextPos - endPos, getEditGroup(children[children.length - 1]));
        return nextPos;
      } else if (isAllInsert || (nextPos == endPos && lastUnchanged)) { // see bug 165654
        RewriteEvent lastChild= children[children.length - 1];
        String separator;
        if (lastChild.getNewValue() instanceof Annotation) {
          separator= formatterPrefix.getPrefix(getIndent(pos));
        } else {
          separator= String.valueOf(' ');
        }
        doTextInsert(endPos, separator, getEditGroup(lastChild));
      }
View Full Code Here

Examples of org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteFormatter.Prefix

      return doVisitUnchangedChildren(node);
    }
    try {
      int pos= getScanner().getNextEndOffset(node.getStartPosition(), true); // pos after question mark

      Prefix prefix;
      if (Boolean.TRUE.equals(getNewValue(node, WildcardType.UPPER_BOUND_PROPERTY))) {
        prefix= this.formatter.WILDCARD_EXTENDS;
      } else {
        prefix= this.formatter.WILDCARD_SUPER;
      }

      int boundKindChange= getChangeKind(node, WildcardType.UPPER_BOUND_PROPERTY);
      if (boundKindChange != RewriteEvent.UNCHANGED) {
        int boundTypeChange= getChangeKind(node, WildcardType.BOUND_PROPERTY);
        if (boundTypeChange != RewriteEvent.INSERTED && boundTypeChange != RewriteEvent.REMOVED) {
          ASTNode type= (ASTNode) getOriginalValue(node, WildcardType.BOUND_PROPERTY);
          String str= prefix.getPrefix(0);
          doTextReplace(pos, type.getStartPosition() - pos, str, getEditGroup(node, WildcardType.BOUND_PROPERTY));
        }
      }
      rewriteNode(node, WildcardType.BOUND_PROPERTY, pos, prefix);
    } catch (CoreException e) {
View Full Code Here

Examples of org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteFormatter.Prefix

      }
    }

    boolean isAnnotationsProperty = isVarargsAnnotationsProperty
        || node instanceof AnnotatableType && property == ((AnnotatableType) node).getAnnotationsProperty();
    Prefix formatterPrefix;
    if (property == SingleVariableDeclaration.MODIFIERS2_PROPERTY ||
        property == TypeParameter.MODIFIERS_PROPERTY || isAnnotationsProperty)
      formatterPrefix= this.formatter.PARAM_ANNOTATION_SEPARATION;
    else
      formatterPrefix= this.formatter.ANNOTATION_SEPARATION;

    int endPos= new ModifierRewriter(formatterPrefix).rewriteList(node, property, pos, keyword, " "); //$NON-NLS-1$

    try {
      int nextPos= getScanner().getNextStartOffset(endPos, false);
      RewriteEvent lastChild = children[children.length - 1];
      boolean lastUnchanged= lastChild.getChangeKind() != RewriteEvent.UNCHANGED;

      if (isAllRemove) {
        doTextRemove(endPos, nextPos - endPos, getEditGroup(lastChild));
        return nextPos;
      } else if ((isAllInsert || (nextPos == endPos && lastUnchanged)) // see bug 165654
          && !isVarargsAnnotationsProperty) {
        String separator;
        if (lastChild.getNewValue() instanceof Annotation) {
          separator= formatterPrefix.getPrefix(getIndent(pos));
        } else {
          separator= String.valueOf(' ');
        }
        doTextInsert(endPos, separator, getEditGroup(lastChild));
      }
View Full Code Here

Examples of org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteFormatter.Prefix

      rewriteTypeAnnotations(node, WildcardType.ANNOTATIONS_PROPERTY, node.getStartPosition());
    }
    try {
      int pos= getScanner().getNextEndOffset(node.getStartPosition(), true); // pos after question mark

      Prefix prefix;
      if (Boolean.TRUE.equals(getNewValue(node, WildcardType.UPPER_BOUND_PROPERTY))) {
        prefix= this.formatter.WILDCARD_EXTENDS;
      } else {
        prefix= this.formatter.WILDCARD_SUPER;
      }

      int boundKindChange= getChangeKind(node, WildcardType.UPPER_BOUND_PROPERTY);
      if (boundKindChange != RewriteEvent.UNCHANGED) {
        int boundTypeChange= getChangeKind(node, WildcardType.BOUND_PROPERTY);
        if (boundTypeChange != RewriteEvent.INSERTED && boundTypeChange != RewriteEvent.REMOVED) {
          ASTNode type= (ASTNode) getOriginalValue(node, WildcardType.BOUND_PROPERTY);
          String str= prefix.getPrefix(0);
          doTextReplace(pos, type.getStartPosition() - pos, str, getEditGroup(node, WildcardType.BOUND_PROPERTY));
        }
      }
      rewriteNode(node, WildcardType.BOUND_PROPERTY, pos, prefix);
    } catch (CoreException e) {
View Full Code Here

Examples of org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteFormatter.Prefix

      } catch (CoreException e) {
        handleException(e);
      }
    }

    Prefix formatterPrefix;
    if (property == SingleVariableDeclaration.MODIFIERS2_PROPERTY)
      formatterPrefix= this.formatter.PARAM_ANNOTATION_SEPARATION;
    else
      formatterPrefix= this.formatter.ANNOTATION_SEPARATION;

    int endPos= new ModifierRewriter(formatterPrefix).rewriteList(node, property, pos, Util.EMPTY_STRING, " "); //$NON-NLS-1$

    try {
      int nextPos= getScanner().getNextStartOffset(endPos, false);

      boolean lastUnchanged= children[children.length - 1].getChangeKind() != RewriteEvent.UNCHANGED;

      if (isAllRemove) {
        doTextRemove(endPos, nextPos - endPos, getEditGroup(children[children.length - 1]));
        return nextPos;
      } else if (isAllInsert || (nextPos == endPos && lastUnchanged)) { // see bug 165654
        RewriteEvent lastChild= children[children.length - 1];
        String separator;
        if (lastChild.getNewValue() instanceof Annotation) {
          separator= formatterPrefix.getPrefix(getIndent(pos));
        } else {
          separator= String.valueOf(' ');
        }
        doTextInsert(endPos, separator, getEditGroup(lastChild));
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.