List of usage examples for javax.xml.namespace QName toString
public String toString()
From source file:org.cloudgraph.config.CloudGraphConfig.java
/** * Returns a table name for the given qualified SDO * Type name.// w w w. jav a 2 s . c om * @param typeName the qualified name of an SDO Type * @return the table name */ public String getTableName(QName typeName) { TableConfig result = this.graphURIToTableMap.get(typeName); if (result == null) throw new CloudGraphConfigurationException( "no HTable configured for" + " CloudGraph '" + typeName.toString() + "'"); return result.getTable().getName(); }
From source file:org.cloudgraph.config.CloudGraphConfig.java
/** * Returns a data graph config for the given qualified SDO * Type name.//from w w w . jav a 2 s . c om * @param typeName the qualified name of an SDO Type * @return a data graph config for the given qualified SDO * Type name. * @throws CloudGraphConfigurationException if no configured data graph * exists for the given qualified SDO * Type name */ public DataGraphConfig getDataGraph(QName qname) { DataGraphConfig result = this.graphURIToGraphMap.get(qname); if (result == null) throw new CloudGraphConfigurationException("no configured for" + " '" + qname.toString() + "'"); return result; }
From source file:org.cloudgraph.store.mapping.StoreMapping.java
@Override public TableMapping getTable(QName typeName) { lock.readLock().lock();/*from w ww .ja va 2s. com*/ try { TableMapping result = findTable(typeName); if (result == null) throw new StoreMappingException( "no HTable configured for " + " graph URI '" + typeName.toString() + "'"); return result; } finally { lock.readLock().unlock(); } }
From source file:org.cloudgraph.store.mapping.StoreMapping.java
@Override public String getTableName(QName typeName) { lock.readLock().lock();/* w w w . j a v a2 s.c o m*/ try { TableMapping result = this.graphURIToTableMap.get(typeName); if (result == null) throw new StoreMappingException( "no HTable configured for" + " CloudGraph '" + typeName.toString() + "'"); return result.getQualifiedName(); } finally { lock.readLock().unlock(); } }
From source file:org.cloudgraph.store.mapping.StoreMapping.java
@Override public DataGraphMapping getDataGraph(QName qname) { lock.readLock().lock();// ww w . j av a 2 s . c o m try { DataGraphMapping result = this.graphURIToGraphMap.get(qname); if (result == null) throw new StoreMappingException("no configured for" + " '" + qname.toString() + "'"); return result; } finally { lock.readLock().unlock(); } }
From source file:org.codice.ddf.spatial.ogc.wfs.catalog.endpoint.WfsEndpoint.java
@Override @POST//from w w w .j a v a2 s. c om @Consumes({ MediaType.TEXT_XML, MediaType.APPLICATION_XML }) @Produces({ MediaType.TEXT_XML, MediaType.APPLICATION_XML }) public XmlSchema describeFeatureType(ogc.schema.opengis.wfs.v_1_0_0.DescribeFeatureTypeType request) throws WfsException { LOGGER.debug("Got describeFeatureType via HTTP POST"); if (request == null) { throw new WfsException("DescribeFeatureType request is null"); } if (validateRequestParameters(request.getService(), request.getVersion())) { if (request.getTypeName().isEmpty()) { return buildMultipleFeatureTypeImportSchema(schemaCache.getFeatureTypeQnames()); } else { Set<QName> qnames = new HashSet<QName>(); for (QName qname : request.getTypeName()) { if (null == schemaCache.getSchemaByQname(qname)) { throw createUnknownTypeException(qname.toString()); } qnames.add(qname); } return processQnamesFromDescribeFeature(qnames); } } else { throw createUnexpectedServiceException(request.getService(), request.getVersion(), Wfs10Constants.DESCRIBE_FEATURE_TYPE); } }
From source file:org.codice.ddf.spatial.ogc.wfs.transformer.xstream.XStreamWfs11FeatureTransformer.java
private MetacardMapper lookupMetacardMapper(QName featureType) { MetacardMapper metacardMapper = null; if (metacardMappers != null) { for (MetacardMapper mapper : metacardMappers) { if (mapper != null && StringUtils.equalsIgnoreCase(mapper.getFeatureType(), featureType.toString())) { logFeatureType(featureType, "Found {} for feature type {}."); metacardMapper = mapper; break; }/*w w w .j a v a 2 s . c o m*/ } if (metacardMapper == null) { logFeatureType(featureType, "Unable to find a {} for feature type {}."); } } return metacardMapper; }
From source file:org.codice.ddf.spatial.ogc.wfs.v110.catalog.source.WfsSource.java
private MetacardMapper getMetacardMapper(final QName featureTypeName) { final Predicate<MetacardMapper> matchesFeatureType = mapper -> mapper.getFeatureType() .equals(featureTypeName.toString()); return metacardMappers.stream().filter(matchesFeatureType).findAny().orElseGet(() -> { LOGGER.debug("Could not find a MetacardMapper for featureType {}. Returning a default implementation.", featureTypeName);/* w w w . ja v a 2 s. c o m*/ return new MetacardMapperImpl(); }); }
From source file:org.codice.ddf.spatial.ogc.wfs.v2_0_0.catalog.source.WfsSource.java
private MetacardMapper lookupMetacardAttributeToFeaturePropertyMapper(QName featureType) { MetacardMapper metacardAttributeToFeaturePropertyMapper = null; if (this.metacardToFeatureMappers != null) { for (MetacardMapper mapper : this.metacardToFeatureMappers) { if (mapper != null && StringUtils.equals(mapper.getFeatureType(), featureType.toString())) { LOGGER.debug("Found {} for feature type {}.", MetacardMapper.class.getSimpleName(), featureType.toString()); metacardAttributeToFeaturePropertyMapper = mapper; break; }/*from www. j ava 2s. c om*/ } if (metacardAttributeToFeaturePropertyMapper == null) { LOGGER.warn("Unable to find a {} for feature type {}.", MetacardMapper.class.getSimpleName(), featureType.toString()); } } return metacardAttributeToFeaturePropertyMapper; }
From source file:org.deegree.feature.persistence.cache.BBoxPropertiesCache.java
@Override public Envelope get(QName ftName) { String s = ftName.toString(); if (!ftNameToEnvelope.containsKey(s)) { throw new IllegalArgumentException( "No envelope information for feature type '" + ftName + "' in cache."); }/* w w w . j a v a2s .c o m*/ return ftNameToEnvelope.get(s); }