Examples of NodeType


Examples of com.sun.sgs.kernel.NodeType

    TRACK_STALE_OBJECTS_PROPERTY, Boolean.FALSE);
      TaskScheduler taskScheduler =
    systemRegistry.getComponent(TaskScheduler.class);
      Identity taskOwner = txnProxy.getCurrentOwner();
      scheduler = new DelegatingScheduler(taskScheduler, taskOwner);
            NodeType nodeType =
                wrappedProps.getEnumProperty(StandardProperties.NODE_TYPE,
                                             NodeType.class,
                                             NodeType.singleNode);

      AccessCoordinator accessCoordinator =
View Full Code Here

Examples of com.sun.sgs.kernel.NodeType

    private void fetchServices(StartupKernelContext startupContext)
       throws Exception
    {
        // before we start, figure out if we're running with only a sub-set
        // of services, in which case there should be no external services
        NodeType type =
            NodeType.valueOf(
                appProperties.getProperty(StandardProperties.NODE_TYPE));
        StandardService finalStandardService = null;
        String externalServices =
            appProperties.getProperty(StandardProperties.SERVICES);
View Full Code Here

Examples of com.sun.sgs.kernel.NodeType

    {
        // at this point the services are ready, so the final step
        // is to initialize the application by running a special
        // KernelRunnable in an unbounded transaction, unless we're
        // running without an application
        NodeType type =
            NodeType.valueOf(
                appProperties.getProperty(StandardProperties.NODE_TYPE));
        if (!type.equals(NodeType.coreServerNode)) {
            try {
                if (logger.isLoggable(Level.CONFIG)) {
                    logger.log(Level.CONFIG, "{0}: starting application",
                               appName);
                }
View Full Code Here

Examples of com.sun.sgs.kernel.NodeType

            throw new IllegalArgumentException("Missing required property " +
                       StandardProperties.APP_ROOT + " for application: " +
                       appName);
        }
       
        NodeType type =
            NodeType.valueOf(
                appProperties.getProperty(StandardProperties.NODE_TYPE));
        if (!type.equals(NodeType.coreServerNode)) {
            if (appProperties.getProperty(StandardProperties.APP_LISTENER) ==
                null)
            {
                logger.log(Level.SEVERE, "Missing required property " +
                       StandardProperties.APP_LISTENER +
View Full Code Here

Examples of de.fu_berlin.inf.dpp.whiteboard.sxe.constants.NodeType

  }

  @Override
  public IRecord getIRecord(DocumentRecord document)
      throws MissingRecordException {
    NodeType nodeType = NodeType.fromString(getString(RecordEntry.TYPE));

    NodeRecord record;
    String tmp, rid;

    ISXERecordFactory factory = document.getController().getRecordFactory();
View Full Code Here

Examples of edu.isi.karma.rep.alignment.NodeType

  private static Node readNode(JsonReader reader) throws IOException {
   
    String id = null;
    Label label = null;
    NodeType type = null;
    String hNodeId = null;
    String columnName = null;
    Label rdfLiteralType = null;
    Label datatype = null;
    String value = null;
    boolean isUri = false;
    SemanticType userSelectedSemanticType = null;
    List<SemanticType> suggestedSemanticTypes = null;
    Set<String> modelIds = null;
   
    reader.beginObject();
      while (reader.hasNext()) {
        String key = reader.nextName();
      if (key.equals("id") && reader.peek() != JsonToken.NULL) {
        id = reader.nextString();
      } else if (key.equals("label") && reader.peek() != JsonToken.NULL) {
        label = readLabel(reader);
      } else if (key.equals("type") && reader.peek() != JsonToken.NULL) {
        type = NodeType.valueOf(reader.nextString());
      } else if (key.equals("hNodeId") && reader.peek() != JsonToken.NULL) {
        hNodeId = reader.nextString();
      } else if (key.equals("columnName") && reader.peek() != JsonToken.NULL) {
        columnName = reader.nextString();
      } else if (key.equals("datatype") && reader.peek() != JsonToken.NULL) {
        datatype = readLabel(reader);
      } else if (key.equals("value") && reader.peek() != JsonToken.NULL) {
        value = reader.nextString();
      } else if (key.equals("isUri") && reader.peek() != JsonToken.NULL) {
        isUri = Boolean.parseBoolean(reader.nextString());
      } else if (key.equals("rdfLiteralType") && reader.peek() != JsonToken.NULL) {
        rdfLiteralType = readLabel(reader);
      } else if (key.equals("userSelectedSemanticType") && reader.peek() != JsonToken.NULL) {
        userSelectedSemanticType = readSemanticType(reader);
      } else if (key.equals("suggestedSemanticTypes") && reader.peek() != JsonToken.NULL) {
        suggestedSemanticTypes = new ArrayList<SemanticType>();
        reader.beginArray();
          while (reader.hasNext()) {
            SemanticType semanticType = readSemanticType(reader);
            suggestedSemanticTypes.add(semanticType);
        }
          reader.endArray();       
      } else if (key.equals("modelIds") && reader.peek() != JsonToken.NULL) {
        modelIds = readModelIds(reader);
      } else {
        reader.skipValue();
      }
    }
      reader.endObject();
     
      Node n = null;
      if (type == NodeType.InternalNode) {
        n = new InternalNode(id, label);
      } else if (type == NodeType.ColumnNode) {
        n = new ColumnNode(id, hNodeId, columnName, rdfLiteralType);
        ((ColumnNode)n).setUserSelectedSemanticType(userSelectedSemanticType);
        ((ColumnNode)n).setSuggestedSemanticTypes(suggestedSemanticTypes);
      } else if (type == NodeType.LiteralNode) {
        n = new LiteralNode(id, value, datatype, isUri);
      } else {
        logger.error("cannot instanciate a node from the type: " + type.toString());
        return null;
      }
     
    n.setModelIds(modelIds);
     
View Full Code Here

Examples of javax.jcr.nodetype.NodeType

     */
    public Element toXml(Document document) {
        Element report = document.createElement(NODETYPES_ELEMENT);
        // loop over the nodetypes to be returned in the report
        while (ntIter.hasNext()) {
            NodeType nt = ntIter.nextNodeType();
            Element ntDef = document.createElement(NODETYPE_ELEMENT);
            ntDef.setAttribute(NAME_ATTRIBUTE, nt.getName());
            ntDef.setAttribute(ISMIXIN_ATTRIBUTE, Boolean.toString(nt.isMixin()));
            ntDef.setAttribute(HASORDERABLECHILDNODES_ATTRIBUTE, Boolean.toString(nt.hasOrderableChildNodes()));
            // JCR 2.0 extension
            ntDef.setAttribute(ISABSTRACT_ATTRIBUTE, Boolean.toString(nt.isAbstract()));
            // JCR 2.0 extension
            ntDef.setAttribute(ISQUERYABLE_ATTRIBUTE, Boolean.toString(nt.isQueryable()));

            // declared supertypes
            Element supertypes = DomUtil.addChildElement(ntDef, SUPERTYPES_ELEMENT, null);
            for (NodeType snt : nt.getDeclaredSupertypes()) {
                DomUtil.addChildElement(supertypes, SUPERTYPE_ELEMENT, null, snt.getName());
            }

            // declared child node definitions
            for (NodeDefinition aCnd : nt.getChildNodeDefinitions()) {
                if (aCnd.getDeclaringNodeType().getName().equals(nt.getName())) {
                    ntDef.appendChild(NodeDefinitionImpl.create(aCnd).toXml(document));
                }
            }

            // declared property definitions
            for (PropertyDefinition aPd : nt.getPropertyDefinitions()) {
                if (aPd.getDeclaringNodeType().getName().equals(nt.getName())) {
                    ntDef.appendChild(PropertyDefinitionImpl.create(aPd).toXml(document));
                }
            }

            String primaryItemName = nt.getPrimaryItemName();
            if (primaryItemName != null) {
                ntDef.setAttribute(PRIMARYITEMNAME_ATTRIBUTE, primaryItemName);
            }
            report.appendChild(ntDef);
        }
View Full Code Here

Examples of javax.jcr.nodetype.NodeType

        session-import
        */
        String referenceableNt = null;
        NodeTypeIterator it = superuser.getWorkspace().getNodeTypeManager().getPrimaryNodeTypes();
        while (it.hasNext() && referenceableNt == null) {
            NodeType nt = it.nextNodeType();
            String ntName = nt.getName();
            if (nt.isNodeType(mixReferenceable) &&
                    !nt.isAbstract() &&
                    // TODO: improve....
                    // ignore are built-in nodetypes (mostly version related)
                    !ntName.startsWith("nt:") &&
                    // also skip all internal node types...
                    !ntName.startsWith("rep:")) {
View Full Code Here

Examples of javax.jcr.nodetype.NodeType

        SessionInfoImpl sInfo = getSessionInfoImpl(sessionInfo);
        NodeTypeManager ntMgr = sInfo.getSession().getWorkspace().getNodeTypeManager();
        List<QNodeTypeDefinition> nodeTypes = new ArrayList<QNodeTypeDefinition>();
        try {
            for (NodeTypeIterator it = ntMgr.getAllNodeTypes(); it.hasNext(); ) {
                NodeType nt = it.nextNodeType();
                nodeTypes.add(new QNodeTypeDefinitionImpl(nt,
                        sInfo.getNamePathResolver(), getQValueFactory()));
            }
        } catch (NameException e) {
            throw new RepositoryException(e);
View Full Code Here

Examples of javax.jcr.nodetype.NodeType

        NodeTypeManager ntMgr = sInfo.getSession().getWorkspace().getNodeTypeManager();
        List<QNodeTypeDefinition> defs = new ArrayList<QNodeTypeDefinition>();
        for (Name nodetypeName : nodetypeNames) {
            try {
                String ntName = sInfo.getNamePathResolver().getJCRName(nodetypeName);
                NodeType nt = ntMgr.getNodeType(ntName);
                defs.add(new QNodeTypeDefinitionImpl(nt,
                        sInfo.getNamePathResolver(), getQValueFactory()));

                // in addition pack all supertypes into the return value
                NodeType[] supertypes = nt.getSupertypes();
                for (NodeType supertype : supertypes) {
                    defs.add(new QNodeTypeDefinitionImpl(supertype,
                            sInfo.getNamePathResolver(), getQValueFactory()));
                }
            } catch (NameException e) {
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.