当前位置: 首页>>代码示例>>Java>>正文


Java DCTerms类代码示例

本文整理汇总了Java中com.hp.hpl.jena.vocabulary.DCTerms的典型用法代码示例。如果您正苦于以下问题:Java DCTerms类的具体用法?Java DCTerms怎么用?Java DCTerms使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DCTerms类属于com.hp.hpl.jena.vocabulary包,在下文中一共展示了DCTerms类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addQualityReport

import com.hp.hpl.jena.vocabulary.DCTerms; //导入依赖的package包/类
public Resource addQualityReport(Model model) {
    Resource qualityReport = model.createResource(LDQM.QUALITY_REPORT_PREFIX + UUID.randomUUID().toString(),QPRO.QualityReport);
    qualityReport.addProperty(QPRO.computedOn, ResourceFactory.createTypedLiteral(DATE_FORMAT.format(new Date()), XSDDatatype.XSDdateTime));
    Resource noDerefSubjectsProblem = model.createResource(QPRO.QualityProblem);
    noDerefSubjectsProblem.addProperty(QPRO.isDescribedBy, LDQM.IRIdereferenceability);
    for (HttpResponse response : responseMap.values()) {
        if (response.getStatusCode() >= 300 || response.getStatusCode() < 200) {
            Resource errSubject = model.createResource(LDQM.Defect_UndereferenceableURI);
            errSubject.addProperty(DCTerms.subject,response.getUri());
            if (response.getStatusCode() > 0) {
                errSubject.addLiteral(HTTP.statusCodeValue, model.createTypedLiteral(response.getStatusCode(), XSDDatatype.XSDint));
            }
            errSubject.addLiteral(HTTP.methodName, response.getMethod());
            if (response.getReason() != null) {
                errSubject.addLiteral(HTTP.reasonPhrase, response.getReason());
            }
            noDerefSubjectsProblem.addProperty(QPRO.problematicThing, errSubject);
        }
    }
    qualityReport.addProperty(QPRO.hasProblem, noDerefSubjectsProblem);
    qualityReport.addProperty(PROV.wasGeneratedBy, evaluation);
    return qualityReport;
}
 
开发者ID:nandana,项目名称:ld-sniffer,代码行数:24,代码来源:Evaluation.java

示例2: parseAnchorGpml

import com.hp.hpl.jena.vocabulary.DCTerms; //导入依赖的package包/类
/**
 * conversion only GPML vocabulary
 */
public static void parseAnchorGpml(MAnchor anchor, Model model, Resource lineRes, DataHandlerGpml data) {
	Resource anchorRes = model.createResource(lineRes.getURI() + "/Anchor/" + anchor.getGraphId());

	anchorRes.addProperty(RDF.type, Gpml.ANCHOR);
	anchorRes.addProperty(DCTerms.isPartOf, lineRes);
	anchorRes.addProperty(DCTerms.isPartOf, data.getPathwayRes());
	
	lineRes.addProperty(Gpml.HAS_ANCHOR, anchorRes);
	
	anchorRes.addLiteral(Gpml.GRAPH_ID, anchor.getGraphId());
	anchorRes.addLiteral(Gpml.POSITION, anchor.getPosition());
	anchorRes.addLiteral(Gpml.SHAPE, anchor.getShape().getName());
	
	data.getAnchors().put(anchor, anchorRes);
}
 
开发者ID:wikipathways,项目名称:GPML2RDF,代码行数:19,代码来源:AnchorConverter.java

示例3: parsePublicationXrefGpml

import com.hp.hpl.jena.vocabulary.DCTerms; //导入依赖的package包/类
/**
 * conversion only GPML vocabulary
 */
public static void parsePublicationXrefGpml(PublicationXref xref, Resource parent, Model model, DataHandlerGpml data) {
	Resource pubXrefRes = null;
	if (xref.getPubmedId() != null && xref.getPubmedId().trim().length() != 0) {
		pubXrefRes = model.createResource(Utils.IDENTIFIERS_ORG_URL + "/pubmed/" + xref.getPubmedId().trim());
	} else {
		pubXrefRes = model.createResource(data.getPathwayRes().getURI() + "/pub/" + xref.getId().trim());
	}
	pubXrefRes.addProperty(RDF.type, Gpml.PUBLICATION_XREF);
	pubXrefRes.addLiteral(Gpml.ID, xref.getPubmedId() != null ? xref.getPubmedId() : "");
	pubXrefRes.addLiteral(Gpml.DATABASE, "Pubmed");
	
	pubXrefRes.addProperty(DCTerms.isPartOf, parent);			
	parent.addProperty(Gpml.HAS_PUBLICATION_XREF, pubXrefRes);
	
	data.getPubXrefs().put(xref, pubXrefRes);
}
 
开发者ID:wikipathways,项目名称:GPML2RDF,代码行数:20,代码来源:PublicationXrefConverter.java

示例4: parsePointGpml

import com.hp.hpl.jena.vocabulary.DCTerms; //导入依赖的package包/类
/**
 * conversion only GPML vocabulary
 */
public static void parsePointGpml(MPoint point, Model model, Resource lineRes, DataHandlerGpml data, String arrowHead) {
	String graphId = point.getGraphId();
	if(graphId == null) {
		graphId = data.getPathway().getUniqueGraphId();
	}
	Resource pointRes = model.createResource(lineRes.getURI() + "/Point/" + graphId);

	pointRes.addProperty(RDF.type, Gpml.POINT);
	pointRes.addProperty(DCTerms.isPartOf, lineRes);
	pointRes.addProperty(DCTerms.isPartOf, data.getPathwayRes());
	
	lineRes.addProperty(Gpml.HAS_POINT, pointRes);
	
	// TODO: make sure that every point has a graph id!!!
	if(point.getGraphId() != null) pointRes.addLiteral(Gpml.GRAPH_ID, point.getGraphId());
	if(point.getGraphRef() != null) pointRes.addLiteral(Gpml.GRAPH_REF, point.getGraphRef());
	pointRes.addLiteral(Gpml.REL_X, point.getRelX());
	pointRes.addLiteral(Gpml.REL_Y, point.getRelY());
	pointRes.addLiteral(Gpml.X, point.getX());
	pointRes.addLiteral(Gpml.Y, point.getY());
	
	if(arrowHead != null) pointRes.addLiteral(Gpml.ARROW_HEAD, arrowHead);
	
	data.getPoints().put(point, pointRes);
}
 
开发者ID:wikipathways,项目名称:GPML2RDF,代码行数:29,代码来源:PointConverter.java

示例5: parseInfoBoxGpml

import com.hp.hpl.jena.vocabulary.DCTerms; //导入依赖的package包/类
/**
 * conversion only GPML vocabulary
 */
public static void parseInfoBoxGpml(PathwayElement e, Model model, DataHandlerGpml data) {
	String graphId = e.getGraphId();
	if(e.getGraphId() == null) {
		graphId = data.getPathway().getUniqueGraphId();
	}
	Resource infoboxRes = model.createResource(data.getPathwayRes().getURI() + "/InfoBox/" + graphId);

	infoboxRes.addProperty(RDF.type, Gpml.INFO_BOX);
	infoboxRes.addProperty(DCTerms.isPartOf, data.getPathwayRes());		
	data.getPathwayRes().addProperty(Gpml.HAS_INFO_BOX, infoboxRes);
	
	infoboxRes.addLiteral(Gpml.CENTER_X, e.getMCenterX());
	infoboxRes.addLiteral(Gpml.CENTER_Y, e.getMCenterY());
	
	data.getPathwayElements().put(e, infoboxRes);
}
 
开发者ID:wikipathways,项目名称:GPML2RDF,代码行数:20,代码来源:InfoBoxConverter.java

示例6: setModelPrefix

import com.hp.hpl.jena.vocabulary.DCTerms; //导入依赖的package包/类
public static void setModelPrefix(Model model){
	model.setNsPrefix("biopax", Biopax_level3.getURI());
	model.setNsPrefix("gpml", Gpml.getURI());
	model.setNsPrefix("wp", Wp.getURI());
	model.setNsPrefix("xsd", XSD.getURI());
	model.setNsPrefix("rdf", RDF.getURI());
	model.setNsPrefix("rdfs", RDFS.getURI());
	model.setNsPrefix("dcterms", DCTerms.getURI());
	model.setNsPrefix("wprdf", "http://rdf.wikipathways.org/");
	model.setNsPrefix("foaf", FOAF.getURI());
	model.setNsPrefix("dc", DC.getURI());
	model.setNsPrefix("skos", Skos.getURI());
	model.setNsPrefix("void", Void.getURI());
	model.setNsPrefix("wprdf", "http://rdf.wikipathways.org/");
	model.setNsPrefix("pav", Pav.getURI());
	model.setNsPrefix("prov", Prov.getURI());
	model.setNsPrefix("dcterms", DCTerms.getURI());
	model.setNsPrefix("freq", Freq.getURI());
}
 
开发者ID:wikipathways,项目名称:GPML2RDF,代码行数:20,代码来源:Utils.java

示例7: CreatePersonModel

import com.hp.hpl.jena.vocabulary.DCTerms; //导入依赖的package包/类
public void CreatePersonModel()
{
    Model pm = ModelFactory.createDefaultModel();
    pm.setNsPrefix("RDF", RDF.getURI());
    pm.setNsPrefix("foaf", FOAF.getURI());
    pm.setNsPrefix("DC", DCTerms.getURI());
    
    ArrayList<String> persons = new ArrayList<String>();
    persons.add("Kumar");
    persons.add("Arjun");
    
    int i = 1;
    for(String p : persons)
    {
        Resource p1 = pm.createResource("http://www.testsite.com/persons/p"+i);
        p1.addProperty(FOAF.firstName, p);
        p1.addProperty(DCTerms.description, "Description of person "+i);
        p1.addProperty(FOAF.mbox, p+i+"[email protected]");
        
        i++;
    }
    
    this.writeModelToFile(pm, "RDF/XML", "personData");
}
 
开发者ID:kumarsharma,项目名称:CSV2LOD,代码行数:25,代码来源:CSV2RDF.java

示例8: add_resource_map_and_aggregation

import com.hp.hpl.jena.vocabulary.DCTerms; //导入依赖的package包/类
private void add_resource_map_and_aggregation(String service_url,
        Resource agg) {
    Resource resmap = model.createResource(service_url);

    resmap.addProperty(RDF.type, resource_map_type);

    Resource agent = model.createResource();
    agent.addProperty(RDF.type, DCTerms.AgentClass);
    agent.addProperty(name, AGENT_NAME);

    resmap.addProperty(DCTerms.creator, agent);

    // TODO What should modified value be?
    resmap.addLiteral(DCTerms.modified,
            model.createTypedLiteral(GregorianCalendar.getInstance()));

    agg.addProperty(RDF.type, aggregation_type);

    resmap.addProperty(describes, agg);
    agg.addProperty(described_by, resmap);
}
 
开发者ID:jhu-digital-manuscripts,项目名称:rosa,代码行数:22,代码来源:ResourceMap.java

示例9: insertComponentStatements

import com.hp.hpl.jena.vocabulary.DCTerms; //导入依赖的package包/类
/**
 * Given the component instance, this function will generate all triples for an insert query
 * 
 * @param component
 * @return String containing the triples that can be used in a insert statement
 */
private String insertComponentStatements(Component component) {
  // get all components and the services list
  String servicesStatements = "";

  for (Service s : component.getServices()) {
    servicesStatements +=
        "<" + component.getUri() + "> <" + LDIS.providesService + ">  <" + s.getUri() + "> .";
    servicesStatements += insertServiceStatements(s);
  }

  // get all components and the services list
  String statemets =
      " <" + component.getUri() + "> a <" + LDIS.StackComponent.getURI() + "> ;   <"
          + RDFS.label.getURI() + "> \"" + component.getLabel() + "\" ^^ xsd:string ; <"
          + DCTerms.hasVersion + "> \"" + component.getVersion() + "\" ^^ xsd:string ; <"
          + FOAF.homepage.getURI() + "> <" + component.getHomepage() + "> . "
          + servicesStatements + " ";

  return statemets;
}
 
开发者ID:GeoKnow,项目名称:GeoKnowGeneratorUI,代码行数:27,代码来源:ComponentManager.java

示例10: insertServiceStatements

import com.hp.hpl.jena.vocabulary.DCTerms; //导入依赖的package包/类
/**
 * Given the service instance, this function will generate all triples for an insert query
 * 
 * @param service
 * @return String containing the triples that can be used in a insert statement
 */
private String insertServiceStatements(Service service) {

  List<String> properties = new ArrayList<String>();
  properties.add("<" + service.getUri() + "> a  <" + service.getType() + "> ; <"
      + RDFS.label.getURI() + "> \"" + service.getLabel() + "\" ^^ xsd:string ; <"
      + DCTerms.description + "> \"" + service.getDescription() + "\" ; <"
      + LDIS.serviceUrl.getURI() + "> <" + service.getServiceUrl() + "> ");

  for (String p : service.getProperties().keySet())
    properties.add("<" + p + "> \"" + service.getProperties().get(p) + "\" ^^ xsd:string ");

  String servicesStatements = StringUtils.join(properties, ";") + ".";

  log.debug(servicesStatements);

  return servicesStatements;
}
 
开发者ID:GeoKnow,项目名称:GeoKnowGeneratorUI,代码行数:24,代码来源:ComponentManager.java

示例11: addDereferenceabilityMeasure

import com.hp.hpl.jena.vocabulary.DCTerms; //导入依赖的package包/类
public void addDereferenceabilityMeasure(Model model, HttpResponse response) {
    Resource subject = model.createResource(response.getUri());
    try {
        subject.addProperty(URI4URI.host, new URI(response.getUri()).getHost());
    } catch (URISyntaxException e) {
        //We quietly ignore if we can't parse the URI
    }
    Resource measure = addMeasure(model, LDQM.IRIdereferenceability, subject);
    if (response.getStatusCode() >= 200 && response.getStatusCode() < 300 ) {
        measure.addLiteral(DQV.value, model.createTypedLiteral(true, XSDDatatype.XSDboolean));
        measure.addLiteral(EVAL.hasLiteralValue, model.createTypedLiteral(true, XSDDatatype.XSDboolean));
    } else {
        measure.addLiteral(DQV.value, model.createTypedLiteral(false, XSDDatatype.XSDboolean));
        measure.addLiteral(EVAL.hasLiteralValue, model.createTypedLiteral(false, XSDDatatype.XSDboolean));
    }
    Resource request = model.createResource(HTTP.Request);
    measure.addProperty(DCTerms.references, request);
    request.addLiteral(HTTP.methodName, response.getMethod());
    request.addLiteral(HTTP.httpVersion, "1.1");
    request.addLiteral(DCTerms.date, model.createTypedLiteral(DATE_FORMAT.format(response.getDate()),XSDDatatype.XSDdateTime));

    Resource res = model.createResource(HTTP.Response);
    request.addProperty(HTTP.resp, res);
    if (response.getStatusCode() > 0) {
        res.addLiteral(HTTP.statusCodeValue, model.createTypedLiteral(response.getStatusCode(),XSDDatatype.XSDint));
    }
    if (response.getReason() != null){
        res.addLiteral(HTTP.reasonPhrase, response.getReason());
    }
}
 
开发者ID:nandana,项目名称:ld-sniffer,代码行数:31,代码来源:Evaluation.java

示例12: filterTripleRelations

import com.hp.hpl.jena.vocabulary.DCTerms; //导入依赖的package包/类
private Collection<TripleRelation> filterTripleRelations(Collection<TripleRelation> entityDescription) {
	List<TripleRelation> result = new ArrayList<TripleRelation>();
	for (TripleRelation triples: entityDescription) {
		triples = triples.orderBy(TripleRelation.SUBJECT, true);
		if (!OpUtil.isEmpty(triples.selectTriple(new Triple(Node.ANY, RDF.Nodes.type, Node.ANY)).getBaseTabular())) {
			result.add(triples);
		}
		// TODO: The list of label properties is redundantly specified in PageServlet
		if (!OpUtil.isEmpty(triples.selectTriple(new Triple(Node.ANY, RDFS.label.asNode(), Node.ANY)).getBaseTabular())) {
			result.add(triples);
		} else if (!OpUtil.isEmpty(triples.selectTriple(new Triple(Node.ANY, SKOS.prefLabel.asNode(), Node.ANY)).getBaseTabular())) {
			result.add(triples);
		} else if (!OpUtil.isEmpty(triples.selectTriple(new Triple(Node.ANY, DC.title.asNode(), Node.ANY)).getBaseTabular())) {
			result.add(triples);					
		} else if (!OpUtil.isEmpty(triples.selectTriple(new Triple(Node.ANY, DCTerms.title.asNode(), Node.ANY)).getBaseTabular())) {
			result.add(triples);					
		} else if (!OpUtil.isEmpty(triples.selectTriple(new Triple(Node.ANY, FOAF.name.asNode(), Node.ANY)).getBaseTabular())) {
			result.add(triples);					
		}
	}
	if (result.isEmpty()) {
		result.add(new TripleRelation(sqlConnection, entityTable, 
				entityMaker, 
				new FixedNodeMaker(RDF.type.asNode()), 
				new FixedNodeMaker(RDFS.Resource.asNode())));
	}
	return result;
}
 
开发者ID:d2rq,项目名称:r2rml-kit,代码行数:29,代码来源:ResourceCollection.java

示例13: getBestLabel

import com.hp.hpl.jena.vocabulary.DCTerms; //导入依赖的package包/类
public static Statement getBestLabel(Resource resource) {
	Statement label = resource.getProperty(RDFS.label);
	if (label == null)
		label = resource.getProperty(SKOS.prefLabel);
	if (label == null)
		label = resource.getProperty(DC.title);
	if (label == null)
		label = resource.getProperty(DCTerms.title);
	if (label == null)
		label = resource.getProperty(FOAF.name);
	return label;
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:13,代码来源:PageServlet.java

示例14: parsePublicationXrefWp

import com.hp.hpl.jena.vocabulary.DCTerms; //导入依赖的package包/类
/**
 * conversion only WP vocabulary
 * semantic information about a publication xref
 */
public static void parsePublicationXrefWp(PublicationXref xref, Resource parent, Model model) {
	if (xref.getPubmedId() == null || xref.getPubmedId().trim().length() == 0) return; // Reconsider...
	String pmid = xref.getPubmedId().trim();
	try {
		Integer.parseInt(pmid);
		Resource pubXrefRes = model.createResource(Utils.IDENTIFIERS_ORG_URL + "/pubmed/" + pmid);
		pubXrefRes.addProperty(RDF.type, Wp.PublicationReference);
		parent.addProperty(DCTerms.references, pubXrefRes);
		pubXrefRes.addProperty(DCTerms.isPartOf, parent);
		pubXrefRes.addProperty(FOAF.page, model.createResource(Utils.PUBMED_URL + pmid));
	} catch (NumberFormatException exception) {
		// invalid Pubmed ID
	}
}
 
开发者ID:wikipathways,项目名称:GPML2RDF,代码行数:19,代码来源:PublicationXrefConverter.java

示例15: parseGroupGpml

import com.hp.hpl.jena.vocabulary.DCTerms; //导入依赖的package包/类
/**
 * conversion only GPML vocabulary
 */
public static void parseGroupGpml(MGroup group, Model model, DataHandlerGpml data) {
	
	String graphId = group.getGraphId();
	if(graphId == null) {
		graphId = group.getGroupId();
	}
	
	Resource groupRes = model.createResource(data.getPathwayRes().getURI() + "/Group/" + graphId);

	groupRes.addProperty(RDF.type, Gpml.GROUP);
	data.getPathwayRes().addProperty(Gpml.HAS_GROUP, groupRes);
	groupRes.addProperty(DCTerms.isPartOf, data.getPathwayRes());	
	
	
	if(group.getGroupRef() != null) groupRes.addLiteral(Gpml.GROUP_REF, group.getGroupRef());
	groupRes.addLiteral(Gpml.GROUP_ID, group.getGroupId());
	if(group.getGraphId() != null) groupRes.addLiteral(Gpml.GRAPH_ID, group.getGraphId());
	if(group.getTextLabel() != null && !group.getTextLabel().equals("")) groupRes.addLiteral(Gpml.TEXTLABEL, group.getTextLabel());
	groupRes.addLiteral(Gpml.STYLE, group.getGroupStyle().getName());
	
	for(String s : group.getBiopaxRefs()) {
		groupRes.addLiteral(Gpml.BIOPAX_REF, s);
	}
	
	for(Comment c : group.getComments()) {
		CommentConverter.parseCommentGpml(c, model, groupRes, data);
	}
	
	for(PublicationXref xref : group.getBiopaxReferenceManager().getPublicationXRefs()) {
		PublicationXrefConverter.parsePublicationXrefGpml(xref, groupRes, model, data);
	}
	
	for(PathwayElement e : group.getGroupElements()) {
		Resource r = data.getPathwayElements().get(e);
		if (r != null) r.addProperty(DCTerms.isPartOf, groupRes);
	}
	
	data.getPathwayElements().put(group, groupRes);
}
 
开发者ID:wikipathways,项目名称:GPML2RDF,代码行数:43,代码来源:GroupConverter.java


注:本文中的com.hp.hpl.jena.vocabulary.DCTerms类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。