Package org.dbwiki.data.schema

Examples of org.dbwiki.data.schema.SchemaNode.label()


        if (node.isAttribute()) {
          newNode = newNode + RelSchemaColTypeValAttribute + ", ";
        } else {
          newNode = newNode + RelSchemaColTypeValGroup + ", ";       
        }
        newNode = newNode + "'" + node.label() + "', ";
        if (node.parent() != null) {
          newNode = newNode + node.parent().id() + ", ";
        } else {
          newNode = newNode + "-1, ";
        }
View Full Code Here


          throw new WikiDataException(WikiDataException.UnknownSchemaNode, sourceNode.label() + " not allowed under " + parentSchemaNode.label());
        }
      }
    } else if (schema.root() != null) {
      schemaNode = schema.root();
      if (!schemaNode.label().equals(sourceNode.label())) {
        throw new WikiDataException(WikiDataException.InvalidPasteTarget, "Node label does not match root label");
      }
    } else {
      if (_wiki.getAutoSchemaChanges() == DatabaseWikiProperties.AutoSchemaChangesAllow) {
        schemaNode = new GroupSchemaNode(schema.size(), sourceNode.label(), null, null);
View Full Code Here

          SchemaNode schema = stmt.targetPath().lastElement().entity();
          String label = null;
          if (stmt.label() != null) {
            label = stmt.label();
          } else {
            label = schema.label();
          }
          if (labelCounter.containsKey(label)) {
            Counter counter = labelCounter.get(label);
            label = label + Integer.toString(counter.value());
            stmt.setLabel(label);
View Full Code Here

    while (schema != null) {
      String target = _request.wri().databaseIdentifier().linkPrefix() + schema.identifier().toURLString();
      if (!versionParameter.versionCurrent()) {
        target = target + "?" + versionParameter.toURLString();
      }
      String link = schema.label();
      // FIXME #schema
      // perhaps this should use the layouter, but currently
      // the treatment of data nodes is hard-coded.
      // It isn't obvious what the code does or how to adapt it
      // to entities.
View Full Code Here

      // of an attribute node or a key value for an internal node.
      // First check whether the nodeIdentifier is a valid node label for the current
      // schema node.
      for (int iChild = 0; iChild < schemaNode.children().size(); iChild++) {
        SchemaNode childSchema = schemaNode.children().get(iChild);
        if ((childSchema.label().equals(nodeIdentifier)) && (childSchema.isAttribute())) {
          // Make sure that there is only one child
          DatabaseElementList nodes = node.find(childSchema.path().substring(node.schema().path().length() + 1));
          if (nodes.size() > 1) {
            throw new WikiDataException(WikiDataException.UnknownResource, url.toString());
          } else if (nodes.size() == 1) {
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.